# DAY12 - background-color 與 image 的混合使用方式 ### 設定一個範圍 - contaiiner ``` <div class="container"> </div> ``` ### CSS 如下: - 設定容器寬高,放置目標圖片 - 由於圖片會自動重複填滿容器,請設定: `no-repeat;` - 設定背景顏色 ``` .container { background-image: url('https://www.fubonguardians.com/content/img/teams/guardians/logo-500x500.png'); background-repeat: no-repeat; width: 600px; height: 600px; background-color: #87CEFA; } ```  ###### tags: `Re:0 前端工程師之路 - HTML CSS 篇章 / 排版-position 篇`
×
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