我想知道如何让背景只出现在角落(以及内容周围的其他 3 个角落),如下图所示......即:
任何和所有帮助将不胜感激!
使用三个 CSS 属性:
background-image
具有多个边框图像,如 background-image: url(IMAGE1), url(IMAGE2), url(IMAGE3), url(IMAGE4)
background-position
定位图像,如 background-position: top left, top right, bottom left, bottom right
background-size
指定图像的大小,如background-size: 200px 80px
接下来尝试:
div.image {
background-color: #fff; /* Set default background color, same that background's base color */
background-image: url("corner.png"); /* Set transparent image for corner */
background-position: right top; /* Set positioning */
background-repeat: no-repeat; /* Disable multiple background images showing */
}