订阅本栏目 RSS您所在的位置: 深山工作室 > DIV+CSS > 正文

一个超级变态的DIV+CSS

深山行者个人网站 2008/6/20 12:43:11 深山行者 字体:大 中 小 浏览 7770

一个超级变态的DIV+CSS

1. E[att^="string"] {property: value;} where E is a selector.

最终显示的结果就是:在以P为标签里,只要他的里面包函"ho"那么它的背景就为绿的

CSS:

p[title^="ho"] {background: green;}


HTML:

<p title="home">
  This paragraph should have a green background.
</p>
<p title="contact">
  The attribute selector doesn’t match this paragraph.
</p>
<p title="house">
  This paragraph should have a green background.
</p>
<p>
  The attribute selector doesn’t match this paragraph.
</p>
<p title="hot">
  This paragraph should have a green background.
</p>


 

以下为详细代码

2. E[att$="string"] {property: value;} where E is a selector.

最终显示的结果就是:在以P为标签里,只要他的里面不包函" t ",那么它的背景就为绿的

css:

p[title$="t"] {background: green;}

html:

<p title="home">
  The attribute selector doesn’t match this paragraph.
</p>
<p title="contact">
  This paragraph should have a green background.
</p>
<p title="house">
  The attribute selector doesn’t match this paragraph.
</p>
<p>
  The attribute selector doesn’t match this paragraph.
</p>
<p title="hot">
  This paragraph should have a green background.
</p>

以下为详细代码
3. E[att*="string"] {property: value;} where E is a selector.

最终显示的结果就是:在以P为标签里,只要他的里面模糊包函" ont ",那么它的背景就为绿的

css:

p[title*="ont"] {background: green;}

html:

<p title="home">
  The attribute selector doesn't match this paragraph.
</p>
<p title="contact">
  This paragraph should have a green background.
</p>
<p title="house">
  The attribute selector doesn't match this paragraph.
</p>
<p>
  The attribute selector doesn't match this paragraph.
</p>
<p title="hot">
  The attribute selector doesn't match this paragraph.
</p>


以下为详细代码
相关阅读
网站站长:提高页面浏览速度的办法
ASP FSO读取XX文件夹下的所有文件列表
汽配公司
连云港五洲旅行社有限公司
网页中Flash弹出网页窗口的详细讲解
利用javascript仿的漂亮的flash效果的菜单
asp获取汉字拼音的第一个字母
深山旅行社网站管理系统 v1.8
更多信息>>栏目类别选择
百度小程序开发
微信小程序开发
微信公众号开发
uni-app
asp函数库
ASP
DIV+CSS
HTML
python
更多>>同类信息
jquery设置或获取修改classname
利用css3.0写出一个音乐播放的唱片碟盘的效果
利用css中的scale()实现放大缩小效果
利用background-color:#000000a8在背景颜色16进制代码之后加字母加上数字让背景色透明
css背景使用base64编码或者将base64编码放在img图片标签中
利用css3中的-webkit-font-smoothing把网页文字的毛边去掉
更多>>最新添加文章
2026 aliyun阿里域名云注册续费优惠口令
dw里面查找替换使用正则删除sqlserver里面的CONSTRAINT
Android移动端自动化测试:使用UIAutomatorViewer与Selenium定位元素
抖音直播音挂载小雪花 懂车帝小程序
javascript获取浏览器指纹可以用来做投票
火狐Mozilla Firefox出现:无法载入您的Firefox配置文件 它可能已经丢失 或是无法访问 问题解决集合处理办法
在Android、iOS、Windows、MacOS中微信小程序的文件存放路径
python通过代码修改pip下载源让下载库飞起
更多>>随机抽取信息
性感的CSS菜单(Menus)
ASP网站打开特别卡 提示:msxml3.dll 错误 '80072ee2' /LM/W3SVC/670931603/Root/global.asa解决办法
仿百度知道宽度高度自适应的圆角边框
初期入门地接旅行社建站解决方案
中小企业网站优化存在的弊病
利用aspJpeg组件生成多图片水印组合时给加上透明水印图片