这个实例css可以写在html里面吗,为啥我的老是报错,有具体的吗
把你做的代码发一下看看
或者参考
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<title> 页面名称 </title>
<style type="text/css">
#bodybox {
margin: 0 auto;
width: 600px;
}
h2 {
text-align: center;
font-weight: bold;
}
ul#nav {
border-top: 3px solid #CC3333;
border-bottom: 3px solid #CC3333;
color: #993333;
display: flex;
justify-content:space-around;
margin: 0;
padding: 0;
}
ul#nav li {
padding: 10px 0px;
list-style: none;
}
#imgbox {
margin: 20px 0px;
text-align: center;
}
#imgbox img {
width: 90%;
}
ul#text {
color: #333333;
margin: 0px;
}
ul#text li {
padding: 5px 0px;
list-style: url(x.png);
}
ul#text li:nth-child(even) {
color: #996633;
}
.text1 {
color: #ff0000;
font-weight: bold;
}
.text2 {
color: #330000;
font-weight: bold;
}
</style>
</head>
<body>
<div id="bodybox">
<h2>网页设计软件列表(点击查看)</h2>
<ul id="nav">
<li>Photoshop软件</li>
<li>illustrator软件</li>
<li>Dreamweaver软件</li>
<li>Fireworks软件</li>
</ul>
<div id="imgbox">
<img src="1.jpg" alt="" />
</div>
<ul id="text">
<li>Photoshop一款好到违反广告法的 <span class="text1">超S级设计神器</span>!给画面来点动感吧。</li>
<li>Photoshop外理以<span class="text2">像素构成的图像</span>, 可以有效地进行图片编辑调整工作。</li>
<li>Photoshop有很多功能,在图像、图形、文字、出版等备方面都有涉及。</li>
<li>在制作建筑效果图包括许三维场景时,常常需要在Photoshop进行调整。</li>
</ul>
</div>
</body>
</html>
如有帮助,请点击我的回答下方的【采纳该答案】按钮帮忙采纳下,谢谢!
css名为:层叠样式表,是可以写到html中的,不过要用特殊字符标记
您好,我是有问必答小助手,您的问题已经有小伙伴帮您解答,感谢您对有问必答的支持与关注!