- 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.
推薦閱讀
- 數(shù)據(jù)科學(xué)實(shí)戰(zhàn)手冊(cè)(R+Python)
- LaTeX Cookbook
- Python自然語言處理實(shí)戰(zhàn):核心技術(shù)與算法
- .NET 4.0面向?qū)ο缶幊搪劊夯A(chǔ)篇
- 信息安全技術(shù)
- 假如C語言是我發(fā)明的:講給孩子聽的大師編程課
- ADI DSP應(yīng)用技術(shù)集錦
- Python機(jī)器學(xué)習(xí)算法與實(shí)戰(zhàn)
- 精通Python自動(dòng)化編程
- HTML5開發(fā)精要與實(shí)例詳解
- Learning Python Data Visualization
- Learning Android Application Testing
- 邊玩邊學(xué)Scratch3.0少兒趣味編程
- Mobile Test Automation with Appium
- Visual FoxPro程序設(shè)計(jì)