寂雨
CSS Background
Try
HackMD
寂雨
·
Follow
Last edited by
寂雨
on
Feb 4, 2020
Linked with GitHub
Contributed by
0
Comments
Feedback
Log in to edit or delete your comments and be notified of replies.
Sign up
Already have an account? Log in
There is no comment
Select some text and then click Comment, or simply add a comment to this page from below to start a discussion.
Discard
Send
CSS Background
background-color(背景顏色)
background-color : #FFFFFF;
#FFFFFF
rgb()
rgba()
red,blue
…
background-size(背景大小)
background-size : 100% 100%;
cover(保持圖像大小,覆蓋背景最小大小)
contain(保持圖像大小,覆蓋背景最大大小)
percentage(100% 100%);
length(auto)
background-repeat(背景是否重複)
background-repeat : no-repeat;
no-repeat(不重複)
repeat(重複)
repeat-x(只重複水平)
repeat-y(只重複垂直)
inherit(繼承父元素設置)
background-origin(背景定位區域)
background-origin : center-box;
content-box(背景在內容邊框裡位置)
padding-box(背景在內距邊框裡位置)
border-box(背景在邊框裡位置)
background-clip(裁減背景)
background-clip : padding-box;
padding-box(背景繪製在內距邊框裡)
border-box(背景繪製在邊框裡)
content-box(背景繪製在內容邊框裡)
background-attachment(背景是否固定)
background-attachment : fixed;
fixed(背景不隨頁面滾動)
scroll(預設,背景隨頁面滾動)
local(背景隨元素滾動)
initial(原始設定)
inherit (繼承父元素的設置)
background-image(背景圖片)
background-image : url("ba.jpg");
background-position(背景位置)
background-position : absolute;
left
top
buttom
right
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up
Comment