css 定義背景不重複

來源:互聯網
上載者:User

css的功能是非常強大的,今天我們就來用css來定義一個塊div的背景,並讓它不重得.

 代碼如下 複製代碼

a{
background-image:url(www,111cn.net/rb/bg.subnav.gif);
background-repeat:no-repeat;
background-attachment:fixed;
background-position:top;
}

上面第一行為a標籤的背景,background-repeat:no-repeat;此標籤的背景不允許重複,background-attachment:fixed;此標籤背景不隨動條滑動而動,background-position:top;這是設定圖片背景的位置等.

本站原創:  www.111cn.net/cssdiv/css.html

相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.