多少汗水後,我向你這個完全CSS的例子!完全可擴展!
Have a fiddle!
HTML
<div id="header" class="page-talk">
<h1 class="page-title">talk</h1>
</div>
CSS
html, body {
margin:0;
padding:0;
}
div#header {
height: 150px;
width: 100%;
background-image: -webkit-linear-gradient(45deg, #ff5071 0%, #5fd6e5 50%, #00ffab 100%);
background-image: -moz-linear-gradient(45deg, #ff5071 0%, #5fd6e5 50%, #00ffab 100%);
background-image: -o-linear-gradient(45deg, #ff5071 0%, #5fd6e5 50%, #00ffab 100%);
background-image: linear-gradient(45deg, #ff5071 0%, #5fd6e5 50%, #00ffab 100%);
background-repeat: no-repeat;
background-size: cover;
position: relative;
z-index: 100;
}
h1.page-title {
font-size: 6em;
font-weight: 100;
font-family:sans-serif;
color: white;
margin:0;
margin-left:15px;
}
#header {
position: relative;
}
#header:before {
content:"";
display: block;
position: absolute;
bottom: 0;
width: 50%;
left: 0;
border-bottom: 20px solid rgba(255, 255, 255, 1);
border-right: 20px solid transparent;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
#header:after {
content:"";
display: block;
position: absolute;
bottom: 0;
width: 50%;
right: 0;
border-bottom: 20px solid rgba(255, 255, 255, 1);
border-left: 20px solid transparent;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
我們可以得到你的小提琴的鏈接? –
@ImranBughio這裏有一個鏈接。這是相當簡單的,因爲我的代碼都是本地的,我正在運行Bootstrap和Wordpress。 http://jsfiddle.net/EBWhg/ – anguiac7
你能提供一張你想要的圖像嗎?我無法用你的描述來描繪它。 – gtramontina