CSS基础-6CSS样式-背景
2015-07-29 23:06
465 查看
<!DOCTYPE html> <!--CSS样式-背景--> <html> <head lang="en"> <meta charset="UTF-8"> <title></title> <link href="css1.css" rel="stylesheet" type="text/css"> </head> <body> <p>人的生命是有限的</p> <p>人的生命是有限的</p> <p>人的生命是有限的</p> <p>人的生命是有限的</p> <p>人的生命是有限的</p> </body> </html> css: /*body{*/ /*背景颜色*/ /*background-color: #b3d4fc;*/ /*}*/ /*p{*/ /*background-color: #cccccc;*/ /*width: 100px;*/ /*padding: 10px;*/ /*}*/ /*body{*/ /*width: 100px;*/ /*height: 100px;*/ /*背景图片*/ /*background-image: url("image/im2.jpg");*/ /*}*/ /*p{*/ /*width: 500px;*/ /*背景图片*/ /*background-image: url("image/im2.jpg");*/ /*}*/ body{ width: 100px; height: 100px; /*背景图片*/ background-image: url("image/item3.jpg"); /*不允许图片重复*/ background-repeat: no-repeat; /*右边指的是:在右边图片中间显示*/ /*background-position: right;*/ /*background-position: right top;*/ /*background-position: 100px 100px;*/ /*背景滚动*/ /*background-attachment: fixed;*/ /*背景图片的大小是1000*1000*/ background-size: 1000px 1000px; }
相关文章推荐