HTML5 背景的顯示區域實(shí)現
這篇文章主要介紹了HTML5 背景的背景顯示區域實(shí)現,文中通過(guò)示例代碼介紹的示區非常詳細,對大家的域實(shí)學(xué)習或者工作具有一定的參考學(xué)習價(jià)值,需要的背景朋友們下面(mian)隨著(zhù)小編來(lái)一起學(xué)習學(xué)習吧
background-clip 屬性規定背景(′?ω?`)的繪制區域。
默認值:(′ω`) border-box
繼承性: no
版本: CSS(⊙_⊙)3
JavaScript 語(yǔ)法: object.style.bac(⊙_⊙)kg(??ヮ?)?*:???roundClip=“content-box&┐(′?`)┌rdquo;
background-clip: border-box|paddin??g-box|content-box;
border-box 背景被裁剪到邊框盒。示區 測試
paddin( ?▽?)g-box 背景被裁剪到內邊距框。域實(shí) 測試
content-bヾ(′?`)?ox 背景被裁剪到內容框。背景
<!DOCTYPE HTML>
<??;html>
<head>
<meta charset="u(?????)tf-8">
<title>背景的示區顯示區域</title>
<style type="text/css">
div {
padding:50px; /* 設置內邊距為50px */
bord??er:50px solid rg??ba(255, 153, 0, 0.6); /*?? 設置邊框寬度為50px */
height:100px;
width:200px;??
color:#fff;
font-size:24px??;
font-weight:bold;
text-shadow:2px 0 1px #f00,
-2px 0 1px #f00,
0 2px 1px #f00,
0 -2px 1px #f00;
background-image:url(..??/images/Bridge.jpg); /* 設置背景圖像 */
background-p(T_T)osition:0 0; /* 背景圖??像起始位為原點(diǎn) */
background-repeat:no-repeat;(′?`*) /* 背景圖像不平鋪 */
-webkit-background-o??rigin:border-box??; /* 原點(diǎn)從邊(bian)框開(kāi)始(webkit) */
-moz-background-origin:border-box; /* 原點(diǎn)從邊框開(kāi)始(moz) */
background-origin:border-box; /* 原點(diǎn)從邊框開(kāi)??始 */
-webkit-backg??round-clip:border-box; /* 背景從邊框開(kāi)始顯示(webkit) */
-moz-bac(╯°□°)╯︵ ┻━┻kground-clip:border-box; /* 背景從邊框開(kāi)始顯示(moz) */
background-clip?:b(°□°)or??der-box; /*?? 背景從邊框開(kāi)始顯示 */
}
</st(//ω//)y??le>
<body>
<div>內容(╯‵□′)╯從這里開(kāi)始</div>
</body>
</ヽ(′▽?zhuān)?ノhtml>
到此這篇關(guān)于HTML5 背景的顯示區域實(shí)現的文章就介紹到這了,更多相關(guān)HTML5 背景顯示區域內容請搜索腳本之家以前的文章或繼續瀏覽下面的相關(guān)文章,希望大家以后多多支持(chi)腳本之家!域實(shí)
背景鏈接:https://www.jb51.net/html5/734542.html
背景




