HTML5 + CSS3 的常用 button 样式

本文展示了如何使用HTML5和CSS3创建吸引人的button样式,通过代码实例详细解析了实现过程。
摘要由CSDN通过智能技术生成

效果图:

 

不多比比,代码:

<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Buttons</title>
<style>
  /* =============================================================================
     HTML5 display definitions
     ========================================================================== */
article, aside, details, figcaption, figure, footer, header, hgroup, nav, section { display: block; }
audio, canvas, video { display: inline-block; *display: inline;*zoom: 1;}
audio:not([controls]) { display: none; }
[hidden] {display: none;}
/* =============================================================================
     Base
     ========================================================================== */

  /*
   * 1. Correct text resizing oddly in IE6/7 when body font-size is set using em units
   * 2. Force vertical scrollbar in non-IE
   * 3. Prevent iOS text size adjust on device orientation change, without disabling user zoom: h5bp.com/g
   */

html {
    font-size: 100%;
    overflow-y: scroll;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
} 
body {
    margin: 0;
    font-size: 13px;
    line-height: 1.231;
}
body, button, input, select, textarea {
    font-family: sans-serif;
    color: #222;
}

  /* 
   * Remove text-shadow in selection highlight: 
   * These selection declarations have to be separate
   * Also: hot pink! (or customize the background color to match your design)
   */

::-moz-selection {
background: #fe57a1;
color: #fff;
text-shadow: none;
}
::selection {
    background: #fe57a1;
    color: #fff;
    text-shadow: none;
}
/* ====================
  • 0
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值