前端之家收集整理的这篇文章主要介绍了
html – 如何选择没有“类型”与CSS,
前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我在这里有3<输入>在我的
HTML:
Name: <input><br>
Age: <input type="number"><br>
Site: <input type="url">
我可以用这些CSS选择底部的两个:
input[type="number"]{
color: gray;
}
input[type="url"]{
color: blue;
}
但是我不知道如何选择没有类型的第一个.
我试过了:
input{
color: red;
}
但它会改变另外两个.
input[type=""]{
color: red;
}
这还不行.
任何想法?
原文链接:https://www.f2er.com/html/230801.html