精通 CSS+DIV 网页样式与布局 39

    xiaoxiao2021-12-14  25

    </style> </head> <body> <p id=”one”>ID 选择器 1</p> <p id=”two”>ID 选择器 2</p> <p id=”two”>ID 选择器 3</p> <p id=”one two”>ID 选择器 3</p> </body> </html> <html> <head> <title>集体声明</title> <style type=”text/css”> <!– h1, h2, h3, h4, h5, p{ /* 集体声明 */ color:purple; /* 文字颜色 */ font-size:15px; /* 字体大小 */ } h2.special, .special, #one{ /* 集体声明 */ text-decoration:underline; /* 下划线 */ } –> </style> </head> <body> <h1>集体声明 h1</h1> <h2 class=”special”>集体声明 h2</h2> <h3>集体声明 h3</h3> <h4>集体声明 h4</h4> <h5>集体声明 h5</h5> <p>集体声明 p1</p> <p class=”special”>集体声明 p2</p> <p id=”one”>集体声明 p3</p> </body> </html> 2.1 选择器的嵌套声明 <html>

    转载请注明原文地址: https://ju.6miu.com/read-968539.html

    最新回复(0)