网页设计中常用的一些技巧
让滚动条变色
这个很简单啦,只要在<head>和</head>间插入:
<style>
BODY{
scrollbar-base-color:#FFFFFF;
scrollbar-face-color:#FFFFFF;
scrollbar-track-color:#FFFFFF;
scrollbar-arrow-color:#aecde7;
scrollbar-3dlight-color:#FFFFFF;
scrollbar-highlight-color:#FFFFFF;
scrollbar-shadow-color:#FFFFFF;
scrollbar-darkshadow-color:#FFFFFF;}
</style>
背景图象重复与否:[/B]
background-repeat:
repeat | repeat-x | repeat-y | no-repeat
注:
以上设置标签的意义
repeat 图象水平垂直方向都重复。
repeat-x 图象水平方向重复。
repeat-y 图象垂直方向重复。
no-repeat 图象不重复。
说:
定义图象重复方向是对于一些独特的图象定位而言。
例:
background-repeat: repeat(设定背景图为重复,如果重复一般不必设置,这个是浏览器默认的。)
背景图的地址最好写全,就是 http://~~因为据说,NETSCAPE4.0以下好象支持的不是很好。
背景图象是否随滚动条移动:
background-attachment:
scroll | fixed
scroll属于浏览器默认的,也就是随滚动条移动,fixed为不动。
[B]给背景图定位:
---就是设置它显示在哪里.最上面top,还是左边left
background-position:
| [percentage | length]{1,2}
|[top | center | bottom]
| [left | center | right]
background-position:[percentage | length]是用X(横坐标)y(纵坐标)定义,如background-position: 20px 40px;
background-position:[top | center | bottom] 和[left | center | right] 是一样的意思了,三个任意两个搭配可以产生不同的效果.
可以是background-position:top center;center bottom;top bottom;left,right.....
bottom:下,top:上,left:左,right:右,center:中.
下为像素与英文的对照:
top left = left top = 0% 0%
top = top center = center top = 50% 0%
right top = top right = 100% 0%
left = left center = center left = 0% 50%
center = center center = 50% 50%
right = right center = center right = 100% 50%
bottom left = left bottom = 0% 100%
bottom = bottom center = center bottom = 50% 100%
bottom right = right bottom = 100% 100%
全部的设定:
{ background: background-color || background-image || background-repeat || background-attachment || background-position }
>>
内容搜索
相关文章
推荐文章


热点资讯
专题栏目

