欧美vvv,亚洲第一成人在线,亚洲成人欧美日韩在线观看,日本猛少妇猛色XXXXX猛叫

新聞資訊

    使用width來設(shè)置盒子內(nèi)容區(qū)的寬度

    使用來設(shè)置盒子內(nèi)容區(qū)的高度

    width和只是設(shè)置的盒子內(nèi)容區(qū)的大小,而不是盒子的整個(gè)大小,盒子可見框的大小由內(nèi)容區(qū),內(nèi)邊距和邊框共同決定

    為元素設(shè)置邊框

    要為一個(gè)元素設(shè)置邊框必須指定三個(gè)樣式

    -width:邊框的寬度

    -color:邊框顏色

    -style:邊框的樣式

    使用-width可以分別指定四個(gè)邊框的寬度

    如果在-width指定了四個(gè)值

    則四個(gè)值會(huì)分別設(shè)置給上、右、下、左,按照順時(shí)針的方向設(shè)置的

    如果指定三個(gè)值

    則三個(gè)值會(huì)分別設(shè)置給上、左右、下

    如果指定兩個(gè)值

    則兩個(gè)值會(huì)分別設(shè)置給上下、左右

    如果指定一個(gè)值,則四邊全都是該值

    除了-width,CSS中還提供了四個(gè)-xxx-width

    xxx的值可能是top right left

    專門用來設(shè)置指定邊的寬度

    * 設(shè)置邊框的顏色

    * 和寬度一樣,color也提供四個(gè)方向的樣式,可以分別指定顏色

    例如:-color: red;

    /*-color: red blue;*/

    css盒子中內(nèi)容邊框?qū)傩訽css盒子中內(nèi)容邊框?qū)傩訽css中的盒子屬性

    /*-color: red ;*/

    /*-color: red ;*/

    格式和邊框設(shè)置顏色相同.

    * 設(shè)置邊框的樣式

    * 可選值:

    * none,默認(rèn)值,沒有邊框

    * solid 實(shí)線

    * 點(diǎn)狀邊框

    * 虛線

    * 雙線

    *

    * style也可以分別指定四個(gè)邊的邊框樣式,規(guī)則和width一致,同時(shí)它也提供-xxx-style四個(gè)樣式css盒子中內(nèi)容邊框?qū)傩?/strong>,來分別設(shè)置四個(gè)邊

    設(shè)置邊框

    大部分的瀏覽器中,邊框的寬度和顏色都是有默認(rèn)值,而邊框的樣式默認(rèn)值都是none

    */

    /* -width: 10px;

    -color: red;

    -style: solid; */

    /*

    - 邊框的簡(jiǎn)寫樣式,通過它可以同時(shí)設(shè)置四個(gè)邊框的樣式,寬度,顏色

    - 而且沒有任何的順序要求

    - 一指定就是同時(shí)指定四個(gè)邊不能分別指定

    css盒子中內(nèi)容邊框?qū)傩訽css中的盒子屬性_css盒子中內(nèi)容邊框?qū)傩?/></p>
<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em;'>-top -right - -left</p>
<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em;'>可以單獨(dú)設(shè)置四個(gè)邊的樣式,規(guī)則和一樣,只不過它只對(duì)一個(gè)邊生效</p>
<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em;'>*/</p>
<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em;'>/*: red solid 10px;*/</p>
<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em;'>/*-left: red solid 10px;*/</p>
<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em;'>內(nèi)邊距:</p>
<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em;'>內(nèi)邊距(),指的是盒子的內(nèi)容區(qū)與盒子邊框之間的距離,一共有四個(gè)方向:</p>
<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em;'>-top</p>
<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em;'>-right</p>
<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em;'>-</p>
<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em;'>-left</p>
<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em;'>內(nèi)邊距會(huì)影響盒子的可見框的大小,元素的背景會(huì)延伸到內(nèi)邊距</p>
<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em;'>盒子的大小由內(nèi)容區(qū)、內(nèi)邊距和邊框共同決定</p>
<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em;'>盒子可見框的寬度 = -left-width + -left + width + -right + -right-width</p>
<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em;'>盒子可見框的高度 = -top-width + -top +  + - + --width</p>
<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em;'>*/</p>
<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em;'>/*設(shè)置上內(nèi)邊距*/</p>
<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em;'>/*-top: 100px;*/</p>
<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em;'>/*設(shè)置右內(nèi)邊距*/</p>
<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em;'>/*-right: 100px;</p>
<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em;'>-: 100px;</p>
<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em;'>-left: 100px;*/</p>
<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em;'>/*</p>
<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em;'><img style='display:block;max-height:500px;max-width:80%;margin: 10px auto;'  src='http://cbu01.alicdn.com/img/ibank/O1CN01BU93kC1H7gKp2Ije9_!!955800711-0-cib.jpg_340x340.webp' alt=

    使用可以同時(shí)設(shè)置四個(gè)邊框的樣式,規(guī)則和-width一致

    */

    /*: 100px;*/

    /*: 100px 200px;*/

    /*: 100px 200px 300px;*/

    外邊距:

    外邊距指的是當(dāng)前盒子與其他盒子之間的距離,他不會(huì)影響可見框的大小,而是會(huì)影響到盒子的位置

    盒子有四個(gè)方向的外邊距:

    -top

    -right

    -

    -left

    由于頁(yè)面中的元素都是靠左靠上擺放的,所以注意當(dāng)我們?cè)O(shè)置上和左外邊距時(shí)css盒子中內(nèi)容邊框?qū)傩?/strong>,會(huì)導(dǎo)致盒子自身的位置發(fā)生改變,而如果是設(shè)置右和下外邊距會(huì)改變其他盒子的位置

    */

    /*設(shè)置上外邊距,即盒子的上邊框與其他盒子的距離*/

    /*-top: 100px;*/

    /*左外邊距*/

    /*-left: 100px;*/

    /*設(shè)置右和下外邊距*/

    /*-right: 100px;

    -: 100px;*/

    /*

    外邊距也可以指定為一個(gè)負(fù)值,如果外邊距設(shè)置的是負(fù)值,則元素會(huì)向反方向移動(dòng)

    css盒子中內(nèi)容邊框?qū)傩訽css中的盒子屬性_css盒子中內(nèi)容邊框?qū)傩?/></p>
<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em;'>*/</p>
<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em;'>/*-left: -100px;</p>
<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em;'>-top: -100px;</p>
<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em;'>-: -100px;*/</p>
<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em;'>/*-: -100px;*/</p>
<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em;'>/*</p>
<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em;'>還可以設(shè)置為auto,auto一般只設(shè)置給水平方向的</p>
<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em;'>如果只指定,左外邊距或右外邊距的為auto則會(huì)將外邊距設(shè)置為最大值</p>
<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em;'>垂直方向外邊距如果設(shè)置為auto,則外邊距默認(rèn)就是0</p>
<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em;'>如果將left和right同時(shí)設(shè)置為auto,則會(huì)將兩側(cè)的外邊距設(shè)置為相同的值,就可以使元素自動(dòng)在父元素中居中</p>
<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em;'>所以我們經(jīng)常將左右外邊距設(shè)置為auto,以使子元素在父元素中水平居中</p>
<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em;'>*/</p>
<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em;'>/*-left: auto;</p>
<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em;'>-right: auto;*/</p>
<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em;'>/*-top: auto;*/</p>
<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em;'>/*</p>
<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em;'>外邊距同樣可以使用簡(jiǎn)寫屬性 ,可以同時(shí)設(shè)置四個(gè)方向的外邊距,規(guī)則和一樣</p>
<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em;'>*/</p>
<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em;'>/*: 10px 20px 30px 40px;*/</p>
<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em;'>為上邊的元素設(shè)置一個(gè)下外邊距:-: 100px;</p>
<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em;'>為下邊的元素設(shè)置一個(gè)上外邊距:-top: 100px;</p>
<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em;'>垂直外邊距的重疊</p>
<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em;'>在網(wǎng)頁(yè)中相鄰的垂直方向的外邊距會(huì)發(fā)生外邊距的重疊</p>
<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em;'><img style='display:block;max-height:500px;max-width:80%;margin: 10px auto;'  src='https://bpic.51yuansu.com/pic3/cover/01/53/91/59454dbc307cc_610.jpg' alt=

    所謂的外邊距重疊指兄弟元素之間的相鄰?fù)膺吘鄷?huì)取最大值而不是取和

    如果父子元素的垂直外邊距相鄰了,則子元素的外邊距會(huì)設(shè)置給父元素

    .box3{

    width: 200px;

    : 100px;

    -color: ;

    /*為box3設(shè)置一個(gè)上邊框*/

    /*-top: 1px red solid;*/

    /*-top: 1px;*/

    -top: 100px;

    }

    .box4{

    width: 100px;

    : 100px;

    -color: ;

    /*為子元素設(shè)置一個(gè)上外邊距,使子元素的位置下移*/

    /*-top: 100px;*/

    瀏覽器為了在頁(yè)面中沒有樣式時(shí),也可以有一個(gè)比較好的顯示效果,所以為很多的元素都設(shè)置了一些默認(rèn)的和,而它的這些默認(rèn)樣式,正常情況下我們是不需要使用的。

    所以我們往往在編寫樣式之前需要將瀏覽器中的默認(rèn)的和統(tǒng)統(tǒng)的去掉

    格式:

    *{

    : 0;

    : 0;

    }

網(wǎng)站首頁(yè)   |    關(guān)于我們   |    公司新聞   |    產(chǎn)品方案   |    用戶案例   |    售后服務(wù)   |    合作伙伴   |    人才招聘   |   

友情鏈接: 餐飲加盟

地址:北京市海淀區(qū)    電話:010-     郵箱:@126.com

備案號(hào):冀ICP備2024067069號(hào)-3 北京科技有限公司版權(quán)所有