Using CSS to realize BMW logo

Source: Internet
Author: User

One day suddenly encountered an interesting face test, need to implement a BMW logo CSS, the first reaction is this is not the cliché of the small deformation of the gossip map, just use pseudo-elements can be easily realized, but a closer look requires that only in a label to write the style, so woo-hum ... Ask the big God, or there are a variety of methods, the following simple share ha!

Achieve the following effects:

The first: the use of pseudo-elements to implement

#box{width:100px;Height:100px;Border-radius:100%;Background-color:#fff;position:relative;Border:1px solid #000;Overflow:Hidden;}#box: Before{position:Absolute;content:"';Top:0; Left:0;width:50px;Height:50px;Background-color:Blue;}#box: after{position:Absolute;content:"'; Right:0;Bottom:0;width:50px;Height:50px;Background-color:Blue;}

The second type: using border to achieve

#boxs {    width:0;     height:0;     Border-radius:100%;     border-width:50px;     border-style:solid;     border-color: #fff blue #fff Blue;     transform: Rotatez (45deg);     box-shadow: 0 0 1px #000;}

Third: Using CSS3 new attribute conic-gradient implementation (compatibility is very big yo)

#box1 {    width: 100px;     height: 100px;     background: conic-gradient (Blue 0% 25%, white 25% 50%, blue 50% 75%, white 75% 100%);     Border-radius: 100%;     Border: 1px solid #000;}

CSS is really profound, do not easily say that they are very good at CSS, in fact, you just have to look at the Zhang Xin Asahi great God's blog you feel that they are really the tip of the iceberg, after a lot of accumulation, thick thin hair!

Using CSS to realize BMW logo

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.