div[class^="test"]
设置只需div内 class 属性值以 "test" 最初的一切 div 元素的配风光:
div[class^="test"]
{
bac千克round:#ffff00;
}
[class*="abc"]
class的值中含有"abc"的元素。
div[class*="abc"]
代表只需div内class=abc的格式
指定最后一个p标签后台技俩
p:last-child{ bac公斤round:#ff0000;}
表现设备分辨率最小768并且最大979时辰表现abc(CSS3)
@media (min-width: 768px) and (max-width: 979px) {
.abc{}
}
ie6-ie9支持
@media screen and (min-width: 1201px) {
.y-row {
width: 1200px;
border:1px solid #333; height:300px;
min-width: 1200px; } }
@media screen and (max-width: 1200px) {
.y-row {
width: 900px;
border:1px solid #333; height:300px;
min-width: 900px; } }