您的位置:首页 > Web前端 > CSS

关于css的背景和列表属性

2015-10-10 10:58 716 查看
背景属性的代码示例如下:
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="Generator" content="EditPlus?">
<meta name="Author" content="">
<meta name="Keywords" content="">
<meta name="Description" content="">
<title>背景属性</title>
<style type="text/css">
/*

*/
body{
background-image:url(images/2.gif) ; /*背景图片*/
background-repeat:no-repeat;  /*no-repeat不要平铺,repeat-x,横向平铺,repeat-y 纵向平铺*/
background-position:right top;  /*背景位置*/
background-attachment: fixed ;   /*背景的移动 ,fixed跟着滚动条一起移动,scroll 不动*/
background-color:#ffff66;  /*背景颜色*/
}
</style>
</head>
<body>
<pre>

<!--此处省略多行-->

</pre>
</body>
</html>


背景属性的运行结果如下:



列表属性的代码示例如下:
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="Generator" content="EditPlus?">
<meta name="Author" content="">
<meta name="Keywords" content="">
<meta name="Description" content="">
<title>列表属性</title>
<style type="text/css">
ol{
list-style-image:url(images/2.gif) ;
margin-left:100px;  /*以后会讲解到*/
}
</style>
</head>
<body>
<ol>
<li>中国</li>
<li>美国</li>
<li>日本</li>
</ol>
</body>
</html>


列表属性的运行结果如下:

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: