关于CSS基本使用

来源:百度知道 编辑:UC知道 时间:2024/07/05 06:53:26
1 做样式表1.css,并在网页5-1.html中应用相关样式。

CSS要求如下:

1)定义网页的的默认字体大小为12px;颜色为黑色,字体为宋体;

2)定义段落的默认行距为1.3em

3)自定义样式s1,要求:块状显示,边界为5px;边框为直线,粗细为1px;填充为10px,宽为200px,高为100px;背景图片为1.gif(图片自己找)

1.css里内容如下:
body{ font-family:"宋体"; font-size:12px; color:#000; line-height:1.3em}
.s1{ display:block; margin:5px; padding:10px; border:solid 1px #000; width:200px; height:100px; background:url(1.gif) no-repeat left top}

5-1.html文件里内容不用我写吧..需要在5-1.html文件<head></head>间加上
<link href="CSS的路径" rel="stylesheet" type="text/css" />

直接用dreamweaver做就可以了,文本---->css样式--->新建里面就可以进行参数设置了

wang89657dd
已以把饭装好了,看你怎么吃!