- Full-Stack Vue.js 2 and Laravel 5
- Anthony Gore
- 91字
- 2021-07-02 19:57:18
Header image
No room listing would be complete without a big, glossy image to show it off. We've got a header image in our mock listing that we'll now include. Add this markup to the page.
index.html:
<p id="app"> <p class="header"> <p class="header-img"></p> </p> <p class="container">...</p> </p>
And this to the CSS file.
style.css:
.header { height: 320px; } .header .header-img { background-repeat: no-repeat; background-size: cover; background-position: 50% 50%; background-color: #f5f5f5; height: 100%; }
You may be wondering why we're using aprather than animgtag. To help with positioning, we're going to set our image as the background of thepwith theheader-imgclass.
推薦閱讀
- 多媒體CAI課件設計與制作導論(第二版)
- LabVIEW程序設計基礎與應用
- Learning ArcGIS Pro
- Windows Server 2012 Unified Remote Access Planning and Deployment
- C程序設計實踐教程
- 全棧自動化測試實戰:基于TestNG、HttpClient、Selenium和Appium
- 深入理解Android:Wi-Fi、NFC和GPS卷
- C語言程序設計
- 微服務架構深度解析:原理、實踐與進階
- HTML5秘籍(第2版)
- Spring MVC+MyBatis開發從入門到項目實踐(超值版)
- PHP與MySQL權威指南
- Mastering jQuery Mobile
- HTML5移動前端開發基礎與實戰(微課版)
- Beginning C# 7 Hands-On:The Core Language