帝王谷资源网 Design By www.wdxyy.com
一列固定宽度网页用于我的学习笔记,很不错吧。这张网页,我只是尝试了一下背景图片的绝对定位设置。
1.HTML部分只需在<body ></body >之间编写一个DIV标签,给DIV标签使用layout作为ID名称即可:<div id="layout">这里写入文章内容</div>;
2.接下来先为body编写CSS代码:(方法还是和“我的第一张css+div布局网页”一样,用鼠标编代码,呵呵!)
body {
margin: 0px;
padding: 0px;
background-attachment: fixed;
background-image: url(images/tupian/a017.JPG);
background-repeat: no-repeat;
background-position: left bottom;
}
再为layout编写CSS代码,确定宽高度外,我进行了绝对定位,设定了上下左右边框距离,为缩小右上角的背景图片,进行了负数设置。
#layout {
height: 480px;
width: 720px;
margin-top: 20px;
margin-right: 30px;
margin-bottom: 20px;
margin-left: 150px;
padding: 40px;
background-image: url(images/tupian/a017-2.jpg);
background-position: right -100px;
background-repeat: no-repeat;
border: thick double #F79A94;
font-family: "宋体";
font-size: 9pt;
color: #993300;
line-height: 150%;
}
如果需要一列固定宽度居中设置,只需把上面四个margin值改为:"margin: 0px auto;"即可。
1.HTML部分只需在<body ></body >之间编写一个DIV标签,给DIV标签使用layout作为ID名称即可:<div id="layout">这里写入文章内容</div>;
2.接下来先为body编写CSS代码:(方法还是和“我的第一张css+div布局网页”一样,用鼠标编代码,呵呵!)
body {
margin: 0px;
padding: 0px;
background-attachment: fixed;
background-image: url(images/tupian/a017.JPG);
background-repeat: no-repeat;
background-position: left bottom;
}
再为layout编写CSS代码,确定宽高度外,我进行了绝对定位,设定了上下左右边框距离,为缩小右上角的背景图片,进行了负数设置。
#layout {
height: 480px;
width: 720px;
margin-top: 20px;
margin-right: 30px;
margin-bottom: 20px;
margin-left: 150px;
padding: 40px;
background-image: url(images/tupian/a017-2.jpg);
background-position: right -100px;
background-repeat: no-repeat;
border: thick double #F79A94;
font-family: "宋体";
font-size: 9pt;
color: #993300;
line-height: 150%;
}
如果需要一列固定宽度居中设置,只需把上面四个margin值改为:"margin: 0px auto;"即可。
帝王谷资源网 Design By www.wdxyy.com
广告合作:本站广告合作请联系QQ:858582 申请时备注:广告合作(否则不回)
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件! 如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件! 如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
帝王谷资源网 Design By www.wdxyy.com
暂无评论...
更新日志
2024年10月07日
2024年10月07日
- 刘美麟《同生》[320K/MP3][70.99MB]
- 群星.1994-宝丽金最流行3CD【宝丽金】【WAV+CUE】
- 群星.2024-聆听“某某”影视原声带【华纳】【FLAC分轨】
- 陈慧娴.1989-永远是你的朋友(2024环球MQA-UHQCD限量版)【环球】【WAV+CUE】
- 何洛洛.2024-别叫醒我(EP)【光羽】【FLAC分轨】
- 林忆莲.1996-爱莲说2CD【华纳】【WAV+CUE】
- 黄妃.2005-红【亚律】【WAV+CUE】
- 刘美麟《同生》[FLAC/分轨][161.95MB]
- 群星《前途海量 电影原声专辑》[320K/MP3][106.26MB]
- 群星《前途海量 电影原声专辑》[FLAC/分轨][227.78MB]
- 张信哲.1992-知道新曲与精丫巨石】【WAV+CUE】
- 王翠玲.1995-ANGEL【新艺宝】【WAV+CUE】
- 景冈山.1996-我的眼里只有你【大地唱片】【WAV+CUE】
- 群星《八戒 电影原声带》[320K/MP3][188.97MB]
- 群星《我的阿勒泰 影视原声带》[320K/MP3][139.47MB]