I am trying to create a header, as you can see in the code example below. In this example, I use 3 different background images. But I don't want to use images because they get ugly on mobile devices with high resolution displays.
Are there any other possibilities for implementing such a header with pure CSS or maybe with vector methods (SVG, clip or similar)?
body {
margin: 0;
}
#header {
height: 50px;
}
#header .bg {
position: absolute;
top: 0;
left: 0;
width: 100%;
}
#header .bg > div {
float: left;
}
#header .bg .left {
width: calc(25% - 59px);
height: 117px;
background-image: url("http://fs5.directupload.net/images/161026/hkplooah.png");
}
#header .bg .curve {
width: 59px;
height: 116px;
background-image: url("http://fs5.directupload.net/images/161026/kk3zkqox.png");
}
#header .bg .right {
width: 75%;
height: 68px;
background-image: url("http://fs5.directupload.net/images/161026/vaucnr84.png");
}
#content {
height: 200px;
background: #cee4fa;
}
<div id="header">
<div class="bg">
<div class="left"></div>
<div class="curve"></div>
<div class="right"></div>
</div>
</div>
<div id="content"></div>
Run codeHide result
source
share