CSS--属性选择器

1、input[type="text"]格式:标签名+【+属性名+“=”+引号+属性值+引号+】
{ color:red;}
2、选中input标签type属性值所有以text开始,或以text-开始的
input[type |= "text"]
3、选中input标签中type属性值以text结束的
input[type &= "text"]
4、选中input标签中type属性包含text
注:该声明中表示,属性值有多个,并且每个属性值之间用空格隔开
input[type ~="text"]
{
color:red;
}
5、选中input标签中type属性包含text
input[type *="text"]
不同于第4点的是属性值有多个但无需空格隔开
6、选中input标签中type属性以字母n开始的
input【type ^= "n"】
{
color:red;
}

posted on 2017-12-17 15:23  斯丢皮得  阅读(121)  评论(0编辑  收藏  举报