DIV+CSS (2): pure div+css made beautiful click button and Close button

Source: Internet
Author: User

Pure div+css made beautiful click button and Close button, click the Click button also has effect. These are not pictures.

Three points worth noting:

1. Among them, the main use of rotate. It allows the text to rotate the angle

2. There are radius, do the round corner dedicated, very useful properties. For people like me save time for drawing.

Transition of CSS3 in the 3.W3C standard this is kind of description: "CSS transition allows CSS property values to smoothly transition within a certain time interval. This effect can be triggered by clicking on the mouse, getting focus, being clicked, or any change to the element, and animating the CSS property values in a sleek and animated manner. "

1 <!DOCTYPE HTML>2 <HTMLLang= "en"> 3 <Head> 4     <MetaCharSet= "UTF-8"> 5     <title></title> 6     <styletype= "Text/css">7 span{8 Display:Inline-block;9 font-size:40px;Ten Font-weight: the; One Line-height:40px; A Text-shadow:0 1px 2px rgba (0,0,0,.1); - -o-transform:Rotate (45deg); - -moz-transform:Rotate (45deg); the -webkit-transform:Rotate (45deg); - -ms-transform:Rotate (45deg); -     } - Button{ + font-size:24px; - letter-spacing:15px; + cursor:Pointer; A width:300px; at Height:44px; - Margin-top:25px; - padding:0; - background:#ef4300; - -moz-border-radius:6px; - -webkit-border-radius:6px; in Border-radius:6px; - Border:1px solid #ff730e; to -moz-box-shadow:0 15px 30px 0 rgba (255,255,255,.25) inset, + 0 2px 7px 0 rgba (0,0,0,.2); - -webkit-box-shadow:0 15px 30px 0 rgba (255,255,255,.25) inset, the 0 2px 7px 0 rgba (0,0,0,.2); * Box-shadow:0 15px 30px 0 rgba (255,255,255,.25) inset, $ 0 2px 7px 0 rgba (0,0,0,.2);Panax Notoginseng font-family:' PT Sans ', Helvetica, Arial, Sans-serif; - Font-weight: the; the Color:#fff; + Text-shadow:0 1px 2px rgba (0,0,0,.1); A -o-transition:All . 2s; the -moz-transition:All . 2s; + -webkit-transition:All . 2s; - -ms-transition:All . 2s; $     } $ Button:hover{ - -moz-box-shadow:0 15px 30px 0 rgba (255,255,255,.15) inset,0 2px 7px 0 rgba (0,0,0,.2); - -webkit-box-shadow:0 15px 30px 0 rgba (255,255,255,.15) inset,0 2px 7px 0 rgba (0,0,0,.2); the Box-shadow:0 15px 30px 0 rgba (255,255,255,.15) inset,0 2px 7px 0 rgba (0,0,0,.2); -     }Wuyi     </style> the     <Scripttype= "Text/javascript"src= "Js/jquery-2.1.1.js"></Script> -     <Scripttype= "Text/javascript"> Wu     $("Button"). Click (function(){ - Alert ("nihao!"); About  $     }); -     </Script> - </Head> - <Body> A <span>+</span><BR/> + <Button>Click</Button> the </Body> - </HTML>

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.