亚洲乱码中文字幕综合,中国熟女仑乱hd,亚洲精品乱拍国产一区二区三区,一本大道卡一卡二卡三乱码全集资源,又粗又黄又硬又爽的免费视频

Html+css實現(xiàn)純文字和帶圖標(biāo)的按鈕

  發(fā)布時間:2016-02-24 16:38:47   作者:佚名   我要評論
這篇文章主要介紹了Html+css實現(xiàn)純文字和帶圖標(biāo)按鈕的方法,按鈕有很多種外觀,本文介紹了純文字和帶圖標(biāo)兩種按鈕,感興趣的小伙伴們可以參考一下

本文總結(jié)一下一些基礎(chǔ)頁面元素的實現(xiàn)方式,后續(xù)陸續(xù)更新。首先我們遇到最多的可能是按鈕的切圖,按鈕可能有很多種外觀,但是一般可分為純文字的和帶圖標(biāo)的按鈕,下面就來說說這兩種按鈕的實現(xiàn)方法。效果圖如下:

代碼如下:

XML/HTML Code復(fù)制內(nèi)容到剪貼板
  1. </pre><pre name="code" class="html"><!DOCTYPE html>     
  2. <html lang="zh-CN">     
  3. <head>     
  4.   <title>按鈕寫法</title>     
  5.   <meta charset="UTF-8">     
  6.   <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">     
  7.   <link rel="stylesheet" href="css/style.css">     
  8. <style type="text/css">     
  9.   a:hover{text-decoration: none;}     
  10.   .btn{     
  11.     display: inline-block;     
  12.     margin-top: 10px;     
  13.     padding: 10px 24px;     
  14.     border-radius: 4px;     
  15.     background-color: #63b7ff;     
  16.     color: #fff;     
  17.     cursor: pointer;     
  18.   }     
  19.   .btn:hover{     
  20.     background-color: #99c6ff;     
  21.   }     
  22.   .inbtn{     
  23.     border: none;     
  24.   }     
  25.   .bubtn{     
  26.     border: none;     
  27.   }     
  28.   .btn{     
  29.     font-style: normal;     
  30.   }     
  31.   .bgbtn span{     
  32.     margin-left: 10px;     
  33.     padding-left: 20px;     
  34.     background: url(images/edit.png) left center no-repeat;     
  35.   }     
  36.   .bgbtn02 img{     
  37.     margin-bottom: -3px;     
  38.     margin-right: 10px;     
  39.   }     
  40. </style>     
  41. </head>     
  42. <body>     
  43. <!--<a>標(biāo)簽按鈕-->     
  44. <a href="" class="btn">a標(biāo)簽按鈕</a>     
  45. <!--<input>標(biāo)簽按鈕-->     
  46. <input class="inbtn btn" type="button" value="input標(biāo)簽按鈕"/>     
  47. <!--<button>標(biāo)簽按鈕-->     
  48. <button class="bubtn btn">button標(biāo)簽按鈕</button>     
  49. <!--任意標(biāo)簽按鈕-->     
  50. <i class="ibtn btn">i標(biāo)簽按鈕</i>     
  51. <!--帶背景圖標(biāo)按鈕-->     
  52. <a href="" class="bgbtn btn">     
  53.   <span>帶圖標(biāo)按鈕</span>     
  54. </a>     
  55. <a href="" class="bgbtn02 btn">     
  56.   <img src="images/edit.png"/>帶圖標(biāo)按鈕     
  57. </a>     
  58. </body>     
  59. </html>     
至于各種標(biāo)簽的優(yōu)缺點,還是需要大家去體會啦,如果大家有什么好玩的按鈕要寫,我們一起實現(xiàn)哦。

相關(guān)文章

最新評論