ボタンタグに似せたアイコン
- <!DOCTYPE html>
- <html lang="ja">
- <head>
- <meta charset="UTF-8">
- <title>ボタンタグに似せたアイコン</title>
- <style type="text/css">
- .btnBase{
- margin:0 2px 0 0;
- padding:1px 4px;
- white-space:nowrap;
- text-decoration: none;
- display: inline-block;
- text-align: center;
- font-family:"MS ゴシック", "Osaka";
- font-size:12px;
- color: #000;
- border: 1px solid #707070;
- -moz-border-radius: .3em;
- border-radius: .3em;
- }
- /* ボタンの色 */
- .btnColr{
- border: 1px solid #707070;
- background: #EBEBEB;
- background: -moz-linear-gradient(top, #F2F2F2, #EBEBEB 50%, #DBDBDB 50%, #CFCFCF); /* Firefox */
- background: -o-linear-gradient(top, #F2F2F2, #EBEBEB 50%, #DBDBDB 50%, #CFCFCF); /* Opera */
- background: -webkit-linear-gradient(linear, top, bottom, #F2F2F2, color-stop(0.5 #EBEBEB), color-stop(0.5 #DBDBDB), #CFCFCF); /* Chrome,Safari */
- background: linear-gradient(linear, top, bottom, #F2F2F2, color-stop(0.5 #EBEBEB), color-stop(0.5 #DBDBDB), #CFCFCF);
- filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#F2F2F2', endColorstr='#CFCFCF'); /* IE5.5、6 */
- box-shadow: 0 0 2px 0 rgba(255,255,255,1) inset;
- -moz-box-shadow: 0 0 2px 0 rgba(255,255,255,1) inset;
- -webkit-box-shadow: 0 0 2px 0 rgba(255,255,255,1) inset;
- }
- .btnColr:hover{
- border: 1px solid #3C7FB1;
- background: #D9F0FC;
- background: -moz-linear-gradient(top, #EAF6FD, #D9F0FC 50%, #BCE5FC 50%, #A7D9F5); /* Firefox */
- background: -o-linear-gradient(top, #EAF6FD, #D9F0FC 50%, #BCE5FC 50%, #A7D9F5); /* Opera */
- background: -webkit-linear-gradient(linear, top, bottom, #EAF6FD, color-stop(0.5 #D9F0FC), color-stop(0.5 #BCE5FC), #A7D9F5); /* Chrome,Safari */
- background: linear-gradient(linear, top, bottom, #EAF6FD, color-stop(0.5 #D9F0FC), color-stop(0.5 #BCE5FC), #A7D9F5);
- filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#EAF6FD', endColorstr='#A7D9F5'); /* IE5.5、6 */
- }
- a.btnColr:active{
- box-shadow: 0 0 2px 0 rgba(128,128,128,1) inset;
- -moz-box-shadow: 0 0 2px 0 rgba(128,128,128,1) inset;
- -webkit-box-shadow: 0 0 2px 0 rgba(128,128,128,1) inset;
- }
- </style>
- </head>
- <body>
- <h1>ボタンタグに似せたアイコン</h1>
- <a class="btnBase btnColr" href="#">ボタン</a>←CSSでaタグをボタンっぽくしたヤツ<br />
- <button>ボタン</button>←buttonタグ<br />
- <div style="font-size:10pt;text-align:right;margin-top:0.5em;">
- <a href="//tips.recatnap.info/" target="_top">PCスキルの小技・忘却防止メモ</a> -
- <a href="//tips.recatnap.info/wiki/" target="_top">PCスキルの小技・忘却防止メモのまとめ(wiki)</a>
- </div>
- <div style="font-size:10pt;text-align:center;margin-top:0.5em;padding:0.5em;border-top:1px solid #ccc;">
- Copyright © 2009 by PCスキルの小技・忘却防止メモ. All rights reserved.
- </div>
- </body>
- </html>