Home > Web Front-end > HTML Tutorial > :Solution_html/css_WEB-ITnose

:Solution_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 11:50:06
Original
1115 people have browsed it

Requirements:
Make a "rectangular div block" and use "long strip background image.jpg" as its background, and the area of ​​the image is smaller than the "rectangular div block";
Make four div sub-blocks , arranged in a row, covering the "rectangular div block",
Each of the four sub-blocks: 25% of the width, semi-transparent, and the colors are "blue, green, yellow, purple"
Each div block The height is height:300px; the width needs to adapt to the page size.


1

2

< div class="bottom_top pic">3

4


------ -------------------------------------------------- --------------------
css file is:
.bottom_top{
width:100%;
height:300px;
background-image:url("Long background image.jpg");
background-size:50%;
z-index:10;
}

.pic{
width:25%;
height:300px;
float:left;
background-image:none;
background-color:orange;
opacity:0.4;
z-index:30;
}





Reply to discussion (solution)

Four div sub-blocks float relative positioning and calculate by yourself Just divide it into lengths,


Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template