<!DOCTYPE HTML> <html> <head> <meta http-equiv="Content-type" content="text/html; charset=UTF-8" /> </head> <body> <h2>1.给下面的div、span、p加上css样式,观察三种元素的区别</h2> <!-- div样式: 添加2px红色边框、字体大小为25px、字体为微软雅黑 span样式: 添加3px绿色边框、字体大小为35px、设置字体斜体 p样式: 设置背景颜色为 cyan、字体大小为30px、设置字体加粗 --> <div style="border: 2px solid red;font-size: 25px;font-family: "幼圆", sans-serif;" >div111</div> <span style="border: 3px solid green;font-size: 35px;font-style: oblique;">span111</span> <p style="background-color: cyan; font-size: 30px;font-weight: normal;">p1111</p> </body> </html> |
|