订阅本栏目 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>


以下为详细代码
相关阅读
实现iis6与iis7环境下支持mp4视频随意拖动、预览播放、边下载边播放
仿mop分页代码
JS获取网页中HTML元素的几种方法
旅行社网站模板9
在table中tr的display:block在firefox下显示布局错乱问题
红色圣诞老人留言板模板
随心所欲的定制弹出窗口
Dreamweaver错误:以下翻译器没有被装载,由于错误;xsltransform.htm;有不正确的设置信息
更多信息>>栏目类别选择
百度小程序开发
微信小程序开发
微信公众号开发
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还有其它的吗
更多>>随机抽取信息
微信小程序发送给朋友与分享到朋友圈显示灰色的但是按钮分享可以使用
asp中Request.ServerVariables能获取的信息整理总结
正则表达式全部符号解释
安康蓝天旅行社官网
中国大宗资产交易网
2010滚动条样式大全最新收集