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

一个超级变态的DIV+CSS

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

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


以下为详细代码
相关阅读
IE 7.0 BETA3 浏览器绿色免安装版下载
a标签的javascript链接
通过阿里云服务接口获得ip地址详细信息
网页链接十字显示就像CAD十字做标一样,效果非常好
在iframe窗口中打开链接
uni-app:使用uni.downloadFile下载word或pdf文件并保存到手机
更变态的页面右击失效代码,选择,全选,全部失效
可以用于考试系统中试卷上交的javascript倒计时
更多信息>>栏目类别选择
百度小程序开发
微信小程序开发
微信公众号开发
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还有其它的吗
更多>>随机抽取信息
设置自己个性的网页滚动条附详细介绍
微信小程序腾讯视频播放组件tencentvideo(wxa75efa648b60994b)
ASP常用内置函数(下)
asp之自动闭合UBB标签函数
蒸汽消音器
非常酷的时钟,图片制作精美,还有日期显示