简单的CSS练习题,11点下课之前要交,求高手帮忙

html-css011

简单的CSS练习题,11点下课之前要交,求高手帮忙,第1张

1.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<meta http-equiv="Content-Type" content="text/htmlcharset=utf-8" />

<title>无标题文档</title>

<link href="style/index.css" rel="stylesheet" type="text/css" />

</head>

<body>

</body>

</html>

css文件里写入

@charset "utf-8"

body {

background:red

}

2.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<meta http-equiv="Content-Type" content="text/htmlcharset=utf-8" />

<title>无标题文档</title>

<link href="style/index.css" rel="stylesheet" type="text/css" />

<style type="text/css">

p{

height:100px

width:100px

background:#00F

}

</style>

</head>

<body>

<div style="margin-bottom:10pxheight:100pxwidth:100pxbackground:green"></div>

<p></p>

</body>

</html>

css文件里写入

@charset "utf-8"

body {

background:red

}

3.

第三个问题是要你自己动手了

你直接就把上面的属性高宽值改变然后刷新下就成了

4.

在css文件中写入下面的代码

a{

text-decoration:none

}

看到这个题目有了兴趣就测试了下,可惜用我以下的样式不支持IE6、IE7,其他浏览器支持;不过题目是死得,工作中不存在这种问题了

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<meta http-equiv="Content-Type" content="text/htmlcharset=gb2312" />

<title>无标题文档</title>

<style>

body{font-size:16px}

.li1{float:leftpadding-top:60px}

.li2{float:leftpadding-top:30pxmargin-left:-55px}

.li3{float:leftmargin-left:-55px}

</style>

</head>

<body>

<ol>

<li class="li1">CCCCCCC</li>

<li class="li2">BBBBBBB</li>

<li class="li3">AAAAAAA</li>

</ol>

</body>

</html>