background-position: 100% -20px這個是什么意思
在CSS中,background-position屬性用于定義背景圖片的位置。它支持兩種語法形式:一種是長度值,另一種是位置值。長度值可以是百分比或是由浮點數(shù)和單位標識符組成的長度值;位置值則有top、center、bottom、left、right等關鍵字。
此屬性的默認值為0% 0%,這意味著背景圖片將定位在元素內(nèi)容區(qū)域的左上角,不考慮邊距的影響。若僅指定一個值,該值將被用作橫坐標的值,縱坐標則默認為50%;若指定兩個值,第二個值將用于縱坐標。
例如,若設置為right center,right作為橫坐標值將覆蓋center值,因此背景圖片將被居右定位。background-position的腳本特性為backgroundPosition。
其取值可表示為:[ [ left | center | right ] [ top | center | bottom ]? ] | [ [ left | center | right ] || [ top | center | bottom ] ] | inherit。具體解釋為:
水平方向可選值:left(左)、center(中)、right(右)
垂直方向可選值:top(上)、center(中)、bottom(下)
垂直與水平組合:x-% y-%(例如:100% -20px,其中100%表示水平方向,-20px表示垂直方向)
繼承值:inherit(繼承父元素的背景位置)
島索19376896706: Passage two Questions 51 to 55 are based on the following passage...
沅陵縣等速: ______ float比較好!position:absolute 這個是絕對定位的意思.容易出問題.分辨率變了,定位不會變.而float不會,它會浮動在上一級,邊上,如<div style="back...
島索19376896706: html5怎么弄圖像和多媒體的詳細過程 -
沅陵縣等速: ______ html5中設置整頁背景圖片的方法是利用css3樣式: 寫法如下:img.bg { /* Set rules to fill background */ min-height: 100%; min-width: 1024px; /* Set up proportionate scaling */ width: 100%; height: auto; /* Set up positioning */ position: fixed; top: 0; ...
島索19376896706: Js,javascript高手進,點擊圖片彈出新網(wǎng)頁.
沅陵縣等速: ______ <a href="#"><img alt="" src=" http://www.cssrain.cn/skins/tim/isll_t.gif"></a>將"#"替換為你想要的連接不就行了麼?
島索19376896706: dw制作網(wǎng)頁添加一張圖片,怎么限制別人下載、復制.
沅陵縣等速: ______ 完全限制是不可能的.只能是禁止鼠標右鍵!
島索19376896706: I paid no interest at school and i was always chasing birs and butterflies by the river -
沅陵縣等速: ______ 要不是我過去不好好讀書,天天在河邊抓小鳥蝴蝶,我現(xiàn)在就舒舒服服地坐在辦公室里了would be sitting 虛擬語氣,表示和現(xiàn)...
島索19376896706: Position of Signatory in the Company 什么意思 -
沅陵縣等速: ______ 簽字人在公司的職位
島索19376896706: js我li添加背景顏色為什么不起作用呢? -
沅陵縣等速: ______ 在JS中要使用CSS的名稱,必須使用駝峰形式,如fontSize.像你這種的話.應該寫成,this.style.borderColor='red';this.style.borderStyle='bolid';this.style.borderWidth='1px';類似這樣子的.如果單純只是在鼠標移到LI上面改變一下樣式.完全可以用CSS實現(xiàn).如:ul li:hover{border:1px solid red}
此屬性的默認值為0% 0%,這意味著背景圖片將定位在元素內(nèi)容區(qū)域的左上角,不考慮邊距的影響。若僅指定一個值,該值將被用作橫坐標的值,縱坐標則默認為50%;若指定兩個值,第二個值將用于縱坐標。
例如,若設置為right center,right作為橫坐標值將覆蓋center值,因此背景圖片將被居右定位。background-position的腳本特性為backgroundPosition。
其取值可表示為:[ [ left | center | right ] [ top | center | bottom ]? ] | [ [ left | center | right ] || [ top | center | bottom ] ] | inherit。具體解釋為:
水平方向可選值:left(左)、center(中)、right(右)
垂直方向可選值:top(上)、center(中)、bottom(下)
垂直與水平組合:x-% y-%(例如:100% -20px,其中100%表示水平方向,-20px表示垂直方向)
繼承值:inherit(繼承父元素的背景位置)
相關評說:
沅陵縣等速: ______ float比較好!position:absolute 這個是絕對定位的意思.容易出問題.分辨率變了,定位不會變.而float不會,它會浮動在上一級,邊上,如<div style="back...
沅陵縣等速: ______ html5中設置整頁背景圖片的方法是利用css3樣式: 寫法如下:img.bg { /* Set rules to fill background */ min-height: 100%; min-width: 1024px; /* Set up proportionate scaling */ width: 100%; height: auto; /* Set up positioning */ position: fixed; top: 0; ...
沅陵縣等速: ______ <a href="#"><img alt="" src=" http://www.cssrain.cn/skins/tim/isll_t.gif"></a>將"#"替換為你想要的連接不就行了麼?
沅陵縣等速: ______ 完全限制是不可能的.只能是禁止鼠標右鍵!
沅陵縣等速: ______ 要不是我過去不好好讀書,天天在河邊抓小鳥蝴蝶,我現(xiàn)在就舒舒服服地坐在辦公室里了would be sitting 虛擬語氣,表示和現(xiàn)...
沅陵縣等速: ______ 簽字人在公司的職位
沅陵縣等速: ______ 在JS中要使用CSS的名稱,必須使用駝峰形式,如fontSize.像你這種的話.應該寫成,this.style.borderColor='red';this.style.borderStyle='bolid';this.style.borderWidth='1px';類似這樣子的.如果單純只是在鼠標移到LI上面改變一下樣式.完全可以用CSS實現(xiàn).如:ul li:hover{border:1px solid red}