被两个男摁住玩弄尿孔的视频,医院玩弄人妻1~12章,巜被部长玩弄的人妻》,东子一夜玩弄白洁7次,东子一夜玩弄白洁7次视频,公玩弄年轻人妻HD

全站搜索 客戶(hù)案例 新聞中心 未分類(lèi)

CSS背景樣式:background屬性

背景樣式主要包括背景顏色和背景圖像。

CSS背景樣式:background屬性

1.background-color 設(shè)置元素的背景顏色。
background-color:顏色/transparent
說(shuō)明:transparent是全透明
顏色值(顏色名/RGB/十六進(jìn)制)
背景區(qū)包括內(nèi)容、內(nèi)邊距(padding)和邊框(border)、不包含外邊距(margin)

2.background-image 設(shè)置元素的背景圖片。
background-image:url(圖片地址)/none
說(shuō)明:url地址可以是相對(duì)地址也可以是絕對(duì)地址
元素的背景占據(jù)了元素的全部尺寸,包括內(nèi)邊距和邊框,但不包括外邊距
默認(rèn)地,背景圖像位于元素的左上角,并在水平和垂直方向上重復(fù)。
當(dāng)即設(shè)置了背景圖片又設(shè)置了背景顏色時(shí),背景圖片會(huì)覆蓋背景顏色

3.background-position 設(shè)置背景圖片的起始位置

A. 這個(gè)屬性只能應(yīng)用于塊元素和替換元素,替換元素包括img、input、textarea、select和object。
B. 該屬性值可以設(shè)置為關(guān)鍵字,也可以設(shè)置為兩個(gè)像素值(”20px 30px“),設(shè)置為關(guān)鍵字時(shí)表示背景圖像相對(duì)于元素的左上角的距離(分別是水平距離和垂直距離)。
C. 該屬性值可取的關(guān)鍵字為:
top left:左上(表示圖像位于元素的左上角,下面的類(lèi)似)
top center:靠上居中
top right:右上
left center:靠左居中
center center:正中
right center:靠右居中
bottom left:左下
bottom center:靠下居中
bottom right:右下

4.background-attachment 背景圖像是否固定或者隨著頁(yè)面的其余部分滾動(dòng)
background-attachment:scroll/fixed
scroll: 默認(rèn)值,隨著圖片的滾動(dòng)而滾動(dòng)
fixed:當(dāng)頁(yè)面的其余部分滾動(dòng)時(shí),背景圖片不會(huì)移動(dòng)

5.background-repeat 設(shè)置背景圖像是否重復(fù)及如何重復(fù)
該屬性可以取如下值:
??????? no-repeat:不平鋪
??????? repeat:在水平方向(x軸)和垂直方向(y軸)同時(shí)平鋪,默認(rèn)值
??????? repeat-x:在水平方向(x軸)平鋪
??????? repeat-y:在垂直方向(y軸)平鋪

6.background 簡(jiǎn)寫(xiě)屬性,作用是將背景屬性設(shè)置在一個(gè)聲明中。
background:[background-color] [background-image] [background-repeat] [background-attachment] [background-position]
說(shuō)明:各值之間用空格分割,不分先后順序

示例代碼

<html>
<head lang="en">
    <meta charset="UTF-8">
    <title>背景屬性</title>
    <style>
        body{
            height: 1000px;
            /*背景顏色   默認(rèn)為透明  transparent*/
            background-color: red;
            /*background-color: #ff0000;*/
            /*background-color: rgb(255,0,0);*/
            /*background-color: rgba(255,0,0,.5);*/
            
            /*背景圖片 默認(rèn)水平垂直平鋪*/
            /*background-image: url("images/pic2.jpeg");*/

            /*背景圖片平鋪*/
            /*background-repeat: no-repeat;*/
            /*background-repeat: repeat-x;*/
            /*background-repeat: repeat-y;*/

            /*背景圖片的大小*/
            /*background-size:1000px ;*/
            /*background-size: 100% 100%;*/

            /*背景圖片固定*/
            /*background-attachment:fixed ;*/

            background:red  url("images/pic2.jpeg") no-repeat fixed ;
            background-size: 100% 100%;
        }
        .box{
            width: 800px;
            height: 600px;
            /*background-color: rgba(255,255,255,.5);
            background-image: url("images/pic1.jpg");
            background-repeat: no-repeat;*/
            /*background-size: contain;*/

            background: rgba(255,255,255,.5) url("images/pic1.jpg") no-repeat;


            /*背景圖片定位*/
            /*background-position: x y;*/
            /*當(dāng)只有水平方向,垂直方向默認(rèn)居中*/
            /*background-position: 30px 30px;*/
            /*background-position: 30px;*/
            /*background-position: right bottom;*/
            /*background-position: center;*/


            /*簡(jiǎn)寫(xiě)為*/
            /*background:顏色 圖片 平鋪 大小  定位 固定;*/
        }
    </style>
</head>
<body>
    <div class="box"></div>
</body>
</html>


上一篇: 下一篇:

相關(guān)推薦

展開(kāi)更多

zh_CNChinese
0

客官請(qǐng)稍后,玩命加載中!

欢迎光临: 阿鲁科尔沁旗| 连江县| 泾川县| 铜川市| 镇平县| 公主岭市| 九寨沟县| 太原市| 英德市| 北票市| 桂东县| 周至县| 越西县| 车致| 闻喜县| 宾阳县| 镇巴县| 吴旗县| 嵩明县| 象山县| 金山区| 阳西县| 济阳县| 巴楚县| 会昌县| 陆川县| 涿鹿县| 昌邑市| 子长县| 南宫市| 濉溪县| 定南县| 老河口市| 耒阳市| 绵阳市| 改则县| 隆昌县| 津市市| 京山县| 永新县| 云南省|