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

一个超级变态的DIV+CSS

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

一个超级变态的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>


以下为详细代码
相关阅读
利用java使图片左右上下循环连续滚动不出现空白
利用DIV+CSS制作右下角弹出留言板
山西省青年旅行社
连云港汽车门户网站
深山旅行社网站管理系统5.0发布
如何加快网站访问速度
这个超级强的div+css图片大小自适应
pywinauto技术文档
更多信息>>栏目类别选择
百度小程序开发
微信小程序开发
微信公众号开发
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把网页文字的毛边去掉
更多>>最新添加文章
dw里面查找替换使用正则删除sqlserver里面的CONSTRAINT
Android移动端自动化测试:使用UIAutomatorViewer与Selenium定位元素
抖音直播音挂载小雪花 懂车帝小程序
javascript获取浏览器指纹可以用来做投票
火狐Mozilla Firefox出现:无法载入您的Firefox配置文件 它可能已经丢失 或是无法访问 问题解决集合处理办法
在Android、iOS、Windows、MacOS中微信小程序的文件存放路径
python通过代码修改pip下载源让下载库飞起
python里面requests.post返回的res.text还有其它的吗
更多>>随机抽取信息
长春海外旅游有限责任公司
吉林省文化国际旅行社
optgroup 标签
中国青岛春秋国际旅行社有限公司
ASP中Utf-8与Gb2312编码转换乱码问题的解决方法页面编码声明
实现iis6与iis7环境下支持mp4视频随意拖动、预览播放、边下载边播放