简体   繁体   English

CSS HTML弯曲标题

[英]css html curved header

I am wondering if anyone can point me in the right direction/or the best method of placing the following image as a header. 我想知道是否有人可以向我指出正确的方向/或将以下图像作为标题的最佳方法。 I am not a web programmer so i am winging this. 我不是网络程序员,所以我对此表示欢迎。

https://www.dropbox.com/s/x8385g42806yisv/man-with-flag.png?dl=0 https://www.dropbox.com/s/x8385g42806yisv/man-with-flag.png?dl=0

not sure, if the image should be slices in two, to make one rectangle and the other the one with the curve 不确定,如果图像应一分为二,则制作一个矩形,另一个制作成带曲线的矩形

or make the image rectangular, and apply CSS 或将图片设为矩形,然后应用CSS

there will be three section below the image, so idealy the section below should transition seamlessly. 在图片下方将有三个部分,因此理想情况下,下面的部分应无缝过渡。

Similar to this http://jsfiddle.net/lotusgodkk/7fjSc/1006/ ? 与此类似http://jsfiddle.net/lotusgodkk/7fjSc/1006/吗?

CSS: CSS:

.a {
    position: relative;
    height: 70px;
    width: 600px;
    background: #182F5B;
}
.a:before, .a:after {
    content:"";
    display: block;
    position: absolute;
    border-radius: 100% 50%;
}
.a:before {
    width: 340px;
    height: 80px;
    background-color: #FFFFFF;
    right: -5px;
    top: 40px;
}
.a:after {
    width: 300px;
    height: 70px;
    background-color: #182F5B;
    left: 0;
    top: 27px;
}

HTML : HTML

<div class="a" /><div/>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM