网易

用CSS进行网页样式设计攻略全集

2006-07-10 10:39:26 来源: 天极网  网友评论 0 进入论坛
边框的属性如下:

  border-width:1px;
  border-style:solid;
  border-color:#000;

  可以缩写为一句:border:1px solid #000;

  语法是border:width style color;

  背景(Backgrounds)

  背景的属性如下:

  background-color:#f00;
  background-image:url(background.gif);
  background-repeat:no-repeat;
  background-attachment:fixed;
  background-position:0 0;

  可以缩写为一句:background:#f00 url(background.gif) no-repeat fixed 0 0;

  语法是background:color image repeat attachment position;

  你可以省略其中一个或多个属性值,如果省略,该属性值将用浏览器默认值,默认值为:

  color: transparent

  image: none

  repeat: repeat

  attachment: scroll

  position: 0% 0%

  字体(fonts)

  字体的属性如下:

  font-style:italic;

  font-variant:small-caps;

  font-weight:bold;

  font-size:1em;

  line-height:140%;

  font-family:"Lucida Grande",sans-serif;

  可以缩写为一句:font:italic small-caps bold 1em/140% "Lucida Grande",sans-serif;

  注意,如果你缩写字体定义,至少要定义font-size和font-family两个值。

  列表(lists)

  取消默认的圆点和序号可以这样写list-style:none;,

  list的属性如下:

  list-style-type:square;
  list-style-position:inside;
  list-style-image:url(image.gif);

  可以缩写为一句:list-style:square inside url(image.gif); gigi_miao

上页 1 2 3 4 下页
精彩推荐

今日网易科技看点


39健康网_中国第一健康门户网站
商业推荐

排行榜

今日网易财经看点


网易科技,更多精彩在首页,
主编信箱 热线:020-85105316 给网易提意见 
About NetEase - 公司简介 - 联系方法 - 招聘信息 - 客户服务 - 相关法律 - 网络营销
网易公司版权所有
©1997-2008