码迷,mamicode.com
首页 > 其他好文 > 详细

属性选择器1

时间:2020-01-06 19:45:26      阅读:115      评论:0      收藏:0      [点我收藏+]

标签:utf-8   html   cap   属性   char   doc   set   meta   htm   

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<!--属性选择器-->
<style>
/*[id]{*/
/*color:blue;*/
/*}*/
/*[class]{*/
/*color:red;*/
/*}*/
/*[class="outer2"]{*/
/*color:rebeccapurple;*/
/*} !*不起作用?*!*/
/*p[class="outer1"]{*/
/*color:red;*/
/*}*/
[star]{
color:royalblue;
}
</style>

</head>
<body>
<div class="outer1">hello div1</div>
<p class="outer1">hello p tag</p>
<div class=="outer2">hello div2</div>
<div class=="outer3" star="comeup">hello div3</div>
<div id="id">id tag</div>

</body>
</html>

属性选择器1

标签:utf-8   html   cap   属性   char   doc   set   meta   htm   

原文地址:https://www.cnblogs.com/startl/p/12157804.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!