本文总结1下1些基本网页页面元素的完成方法,后续陆续升级。最先大家遇到数最多的将会是按钮的切图,按钮将会有许多种外型,可是1般可分成纯文本的和带标志的按钮,下面就来讲说这两种按钮的完成方式。实际效果图以下:
编码以下:
XML/HTML Code拷贝內容到剪贴板
- </pre><pre name="code" class="html"><!DOCTYPE html>
- <html lang="zh-CN">
- <head>
- <title>按钮写法</title>
- <meta charset="UTF⑻">
- <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
- <link rel="stylesheet" href="css/style.css">
- <style type="text/css">
- a:hover{text-decoration: none;}
- .btn{
- display: inline-block;
- margin-top: 10px;
- padding: 10px 24px;
- border-radius: 4px;
- background-color: #63b7ff;
- color: #fff;
- cursor: pointer;
- }
- .btn:hover{
- background-color: #99c6ff;
- }
- .inbtn{
- border: none;
- }
- .bubtn{
- border: none;
- }
- .btn{
- font-style: normal;
- }
- .bgbtn span{
- margin-left: 10px;
- padding-left: 20px;
- background: url(images/edit.png) left center no-repeat;
- }
- .bgbtn02 img{
- margin-bottom: ⑶px;
- margin-right: 10px;
- }
- </style>
- </head>
- <body>
- <!--<a>标识按钮-->
- <a href="" class="btn">a标识按钮</a>
- <!--<input>标识按钮-->
- <input class="inbtn btn" type="button" value="input标识按钮"/>
- <!--<button>标识按钮-->
- <button class="bubtn btn">button标识按钮</button>
- <!--随意标识按钮-->
- <i class="ibtn btn">i标识按钮</i>
- <!--带情况标志按钮-->
- <a href="" class="bgbtn btn">
- <span>带标志按钮</span>
- </a>
- <a href="" class="bgbtn02 btn">
- <img src="images/edit.png"/>带标志按钮
- </a>
- </body>
- </html>