CSS Basics Tutorial--bubble balloon for pure CSS development

Source: Internet
Author: User

This article is the official HTML5 training course of h5edu agency, Main introduction: CSS Basic Tutorial--The Bubble-type prompt box of pure CSS development
As a front-end developer, we are familiar with the use of CSS to generate rich on the page style, for the border border property, is also our most familiar CSS properties, today we will introduce how to use pure CSS to generate a bubble style balloon, I hope you like!

In this article we will use the following pseudo-label to generate the indicator arrows for the cue box.

First we define the relevant properties of the cue box, we add the box shadow and the text shadow effect, which makes the cue box more beautiful:

/* Bubble */
. tip-bubble {
position:relative;

width:100px;
padding:20px;
Color: #CCC;
Text-align:center;
border-radius:10px;
margin:50px;
border:1px solid #111;
box-shadow:1px 1px 2px #202020;
-moz-box-shadow:1px 1px 2px #202020;
-webkit-border-shadow:1px 1px 2px #202020;
text-shadow:0px 0px 15px #fff;
Copy the Code
Next we deal with: after pseudo tag:

. tip-bubble:after {
Content: ";
Position:absolute;
width:0;
height:0;
BORDER:15PX solid;
Copy the Code
Finally we define the arrow direction of the Cue box:

. tip-bubble-top:after {
Border-bottom-color: #202020;
left:50%;
bottom:100%;
Margin-left: -15px;
}

Click to enter CSS Basics Tutorial: http://www.h5edu.cn/htm/step/h5edu_133.html

CSS Basics Tutorial--bubble balloon for pure CSS development

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.