| | |
| | | position: relative; |
| | | background: transparent; |
| | | /* 移除黑色背景 */ |
| | | background-image: url("{{image}}"); |
| | | background-size: cover; |
| | | background-position: center; |
| | | } |
| | | |
| | | /* 背景使用图片并做模糊处理,完全覆盖整个页面 */ |
| | | .bg { |
| | | position: relative; |
| | | width: 100%; |
| | | height: 100%; |
| | | background-image: url("{{image}}"); |
| | | background-size: cover; |
| | | background-position: center; |
| | | position: absolute; |
| | | inset: 0; |
| | | z-index: 0; |
| | | overflow: hidden; |
| | | } |
| | | |
| | | .main { |
| | | position: relative; |
| | | z-index: 1; |
| | | width: 100%; |
| | | height: 1080px; |
| | | } |
| | |
| | | </head> |
| | | |
| | | <body> |
| | | <!-- <div class="bg"></div> --> |
| | | <div class="bg">{{media}}</div> |
| | | <div class="main"> |
| | | <div class="title">{{title}}</div> |
| | | <div class="text">{{text}}</div> |
| | |
| | | </div> |
| | | </body> |
| | | |
| | | </html> |
| | | </html> |