執行 ❯
建立您
自己的
網站
×
更改方向
儲存程式碼
更改主題,深色/淺色
前往 Spaces
<!DOCTYPE html> <html> <head> <style> #example1 { border: 2px solid black; padding: 25px; background: url(img_tree.gif), url(mountain.jpg); background-repeat: no-repeat; background-size: contain, cover; } </style> </head> <body> <h2>background-size: contain, cover:</h2> <div id="example1"> <h2>Hello World</h2> <p>Here we have two background images. We specify the size of the first background image with "contain", and the second background-image with "cover".</p> </div> </body> </html>