First on:
The principle is very simple, as long as the use of CSS 2D conversion plus rounded border;
1. First use the rounded border to write the following effect:
2. Write a reverse direction:
Then the two rotation of a certain angle stitching together can be;
The complete code is as follows:
1 <!DOCTYPE HTML>2 <HTMLLang= "en">3 <Head>4 <MetaCharSet= "UTF-8">5 <title>Demo</title>6 <styletype= "Text/css">7 *{8 margin:0;9 padding:0;Ten } One . Box{ A width:220px; - Height:100px; - position:relative; the margin:100px Auto; - } - . Box:before,.box:after{ - content:""; + width:60px; - Height:60px; + position:Absolute; A Top:0; at Left:0; - Border:20px Solid #06c999; - Border-radius:50px 50px 0 50px; - -webkit-transform:Rotate ( -45deg); - } - . Box:after{ in Left:Auto; - Right:0; to Border-radius:50px 50px 50px 0; + -webkit-transform:Rotate (45deg); - } the </style> * </Head> $ <Body>Panax Notoginseng <Divclass= "box"></Div> - </Body> the </HTML>
CSS to achieve 8-character inverted effect