Pure CSS3 to implement custom graffiti style borders

Source: Internet
Author: User
Tags implement

Today we're going to share a custom border application based on pure CSS3, which looks like a ToolTip control because the bottom border has a small triangle, just like a reference text box in many places. In addition, the CSS3 border is graffiti-style and looks very personal. The advantage of implementing a custom border with CSS3 is that you can adapt the amount of text inside the border.

You can also view the online demo here

Let's share the implementation approach, which consists primarily of HTML code and CSS code.

HTML code:
        <div>css3 Simple to implement graffiti style border Welcome to</div>
</div >

HTML code structure is very simple, only 3 div composition, of course, behind the CSS code is the key, we step-by-step to explain.

CSS Code:
. Wrap {
padding:35px 25px;
margin:40px Auto;
Background: #586786;
border-radius:255px 15px 225px 15px/15px 225px 15px 255px;
Color: #eee;
box-shadow:1px 1px 0px rgba (0, 0, 0,.)

This CSS code defines the outermost border, using Border-radius to achieve the rounded corners of the border, while taking advantage of the Box-shadow to implement a slightly shaded effect, it is not obvious that you can also fix a property value to make the shadow a little more obvious.

. box {
Background: #fff;
Border:solid 5px #fff;
margin:0 Auto;
border-radius:255px 15px 225px 15px/15px 225px 15px 255px;
Color: #666;
box-shadow:2px 3px 1px rgba (0, 0, 0,. 75)
. box:before {
Content: "";
Bottom: -20px;
Border-color:transparent #fff;

Related Article

Alibaba Cloud 10 Year Anniversary

With You, We are Shaping a Digital World, 2009-2019

Learn more >

Apsara Conference 2019

The Rise of Data Intelligence, September 25th - 27th, Hangzhou, China

Learn more >

Alibaba Cloud Free Trial

Learn and experience the power of Alibaba Cloud with a free trial worth $300-1200 USD

Learn more >

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.