如果还不了解css属性选择器,先搜索以前的文章来看,这几个属性选择器写得挺有意思。
提示abbr
abbr[title] {
color: #666;
border-bottom: 1px dotted #666;
}
abbr[title]:hover {
border-bottom-style: solid;
cursor: help;
}
隐藏468×60的图片
img[width="468"][height="60"],
img[width="468px"][height="60px"] {
display: none !important;
}
所有468×60的元素都隐藏
*[width="468"][height="60"], *[width="468px"][height="60px"] {
display: none !important;
}
控制input样式
input[type='text'] { } or input[type='submit']
Instead with the little help of JavaScript I have it just append the type it is as a className to itself…this way we could, at the least, do this:
为了ie,改成class,然后拿javascript遍历
input.text { }
input.submit { }
链接内容说明
a[href^=mailto]:after { content: ”(Email)”; }
a[href$=.pdf]:after { content: ”(PDF)”; }
via The Attribute Selector for Fun and (no ad) Profit
Leave a reply