常用表单美化-美观的表单小程序-小程序表单制作
1.用CSS设定文本样式
2.常用文本属性列表:
3.font-size字体大小font-family字体类型font-style字体样式color设置或检索文本的颜色text-align文本对齐(left、center、right)
4.font-weight文字粗细text-decoration文字下划线line-height文字的行间距letter-spacing字间距
!DOCTYPEhtmlhtmlheadmetacharset="UTF-8"title/titlestyletype="text/css"#txtSylte{font-size:18px;font-family:"微软雅黑";font-weight:bold;color:blue;line-height:35px;text-decoration:underline;text-align:center;letter-spacing:inherit;}/style/headbodydivid="txtSylte"床前明月光,br/疑是地上霜。br/举头望明月,br/低头思故乡。/div/body/html5.用css设置网页中的背景:
6.常用的背景属性列表:background-color背景颜色,background-image背景图片background-repeat背景图的重复方向
7.background-position背景图片的位置
8.背景图片的位置:为了减少HTTP请求的次数,在网页中有时需要将较多的小图片放在一张较大的图片中,然后用背景图片位置属性background-position来定位要显示的图片,可以用绝对定位和相对定位来表示。background-position:10px20px;表示从该图片左边10px,上边20px算起,background-position:10%20%;表示分别从该图片左边10%上边20%起
styletype="text/css"body{background-image:url(img/bodybg.jpg);background-repeat:repeat-y;}/style9.div基准点:0px,0px
!DOCTYPEhtmlhtmlheadmetacharset="UTF-8"title/titlestyletype="text/css"#bgstyle1{width:300px;height:38px;background-image:url(img/taobao.gif);background-position:0px-18px;}#bgstyle2{width:82px;height:80px;border:1pxsolidblue;background-image:url(img/taobao.gif);background-position:-50px-110px;}/style/headbodydivid="bgstyle1"/divbr/divid="bgstyle2"/div/body/html声明:本站所有文章资源内容,如无特殊说明或标注,均为采集网络资源。如若本站内容侵犯了原著者的合法权益,可联系本站删除。

