- 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.
推薦閱讀
- Learning RxJava
- Android Development with Kotlin
- C#程序設計(慕課版)
- The Computer Vision Workshop
- 薛定宇教授大講堂(卷Ⅳ):MATLAB最優(yōu)化計算
- HTML5+CSS3+JavaScript Web開發(fā)案例教程(在線實訓版)
- HTML5 and CSS3 Transition,Transformation,and Animation
- Web Development with MongoDB and Node(Third Edition)
- Python深度學習:基于TensorFlow
- Haskell Data Analysis Cookbook
- 零基礎Java學習筆記
- C語言程序設計實踐
- Machine Learning for OpenCV
- Robot Framework Test Automation
- 深入理解Java虛擬機:JVM高級特性與最佳實踐