Chinaunix首页 | 论坛 | 博客
  • 博客访问: 96173
  • 博文数量: 34
  • 博客积分: 925
  • 博客等级: 准尉
  • 技术积分: 350
  • 用 户 组: 普通用户
  • 注册时间: 2011-08-15 11:52
文章分类

全部博文(34)

文章存档

2011年(34)

我的朋友

分类: 系统运维

2011-08-18 13:10:00

  1. <p style="background-color:yellow;">This text has a background color applied.</p>
This results in:

This text has a background color applied.

CSS Background Image
  1. <p style="height:100px;background-image:url(/pix/smile.gif);">This text has a background image applied. </p>

CSS Background Repeat
  1. <p style="height:100px;background-image:url(/pix/smile.gif);background-repeat:no-repeat;">This background image does not repeat. </p>

CSS Background Position
  1. <p style="height:100px;background-image:url(/pix/smile.gif);background-repeat:no-repeat;background-position:100px;">This background image is positioned 100 pixels in from the left. </p>

CSS Background AttachmentDetermines whether or not the background image scrolls with the outer container.
  1. <p style="height:100px;width:150px;overflow:scroll;background-image:url(/pix/smile.gif);background-attachment:fixed;">This background image is fixed - it doesn't scroll with its outer container. This example uses the CSS overflow property to force the box to scroll when there's too much text to fit in the box. </p>


阅读(328) | 评论(0) | 转发(0) |
0

上一篇:HTML 常用标记

下一篇:CSS Border

给主人留下些什么吧!~~