Pure CSS make bubble prompt box

Source: Internet
Author: User

Source: http://www.ido321.com/1214.html


The first two days translated an article about using CSS border properties to make Basic graphics: http://www.ido321.com/1200.html

On this basis, today to share an article to everyone, if you make use of CSS bubble cue box.

First look at 2 photos:

Css:

/*dialog Bubblesusage: Use the. speech-bubble and. Speech-bubble-direction Classes<div class= "speech-bubble speech-bubble-top" >hi there</div>*/ . Speech-bubble{position:relative;  Background-color:#292929;   width:200px;  Height:150px;  Line-height:150px; / * Vertical Center * /  Color:White ;  text-align:Center;  Border-radius:10px;  font-family: Sans-serif;}. Speech-bubble: after {content:";  position:Absolute;   width: 0;Height: 0;Border:15px solid;}/ * Position of Arrow * /. Speech-bubble-top: after {Border-Bottom-Color:#292929;   Left:50%;  Bottom:100%;  margin- Left:-15px;}. Speech-bubble-right: after {Border- Left-Color:#292929;    Left:100%;  Top:50%;  margin-Top:-15px;}. Speech-bubble-bottom: after {Border-Top-Color:#292929;  Top:100%;   Left:50%;  margin- Left:-15px;}. Speech-bubble-left: after {Border- Right-Color:#292929;  Top:50%;   Right:100%;  margin-Top:-15px;}

Html:

<!DOCTYPE HTML><HTML>    <Head>        <Link rel= "stylesheet" type= "Text/css" href= "Maopao.css">        <title>Test</title>    </Head>    <Body>        <Div class= "Speech-bubble speech-bubble-top">Arrows at the top of</Div>         <BR/>        <Div class= "Speech-bubble speech-bubble-bottom">Arrow at bottom</Div>        <BR/>        <Div class= "Speech-bubble speech-bubble-left">Arrow on the Left</Div>         <BR/>        <Div class= "Speech-bubble speech-bubble-right">Arrow on the right</Div>    </Body></HTML>

Demo Address: http://jsfiddle.net/80r9kjs2/embedded/result/

Next: PHP: A method of generating non-repeating random numbers



Pure CSS make bubble prompt box

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.