html中button的立体效果圆角

编程入门 行业动态 更新时间:2024-10-05 01:21:41

html中button的立体效果<a href=https://www.elefans.com/category/jswz/34/1767438.html style=圆角"/>

html中button的立体效果圆角

首先先做一个按钮,

  1. <a href="#" class="button myconfirm">button</a>  
  2. 这样就有了一个没有背景样式的跳转文字,然后用css添加样式/
    .button {  display: inline-block;  //用于设置宽高position: relative;  margin: 10px;  padding: 0 20px;  text-align: center;  text-decoration: none;  font: bold 12px/25px Arial, sans-serif;  
    }  

  3. <span style="color:#0000ff;"><strong>上颜色
    </strong></span><pre name="code" class="html">.myconfirm {  color: #030321;  background: #a5cd4e;  
    }  

     
  4. 设置圆角<pre name="code" class="html">.button {  display: inline-block;  position: relative;  margin: 10px;  padding: 0 20px;  text-align: center;  text-decoration: none;  font: bold 12px/25px Arial, sans-serif;  text-shadow: 1px 1px 1px rgba(255,255,255, .22);  -webkit-border-radius: 30px;  -moz-border-radius: 30px;  border-radius: 30px;  -webkit-box-shadow: 1px 1px 1px rgba(0,0,0, .29), inset 1px 1px 1px rgba(255,255,255, .44);  -moz-box-shadow: 1px 1px 1px rgba(0,0,0, .29), inset 1px 1px 1px rgba(255,255,255, .44);  box-shadow: 1px 1px 1px rgba(0,0,0, .29), inset 1px 1px 1px rgba(255,255,255, .44);  -webkit-transition: all 0.15s ease;  -moz-transition: all 0.15s ease;  -o-transition: all 0.15s ease;  -ms-transition: all 0.15s ease;  transition: all 0.15s ease;  
    }  

     
  5. 立体效果<pre name="code" class="html">/* Green Color */  .green {  color: #3e5706;  background: #a5cd4e; /* Old browsers */  background: -moz-linear-gradient(top,  #a5cd4e 0%, #6b8f1a 100%); /* FF3.6+ */  background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#a5cd4e), color-stop(100%,#6b8f1a)); /* Chrome,Safari4+ */  background: -webkit-linear-gradient(top,  #a5cd4e 0%,#6b8f1a 100%); /* Chrome10+,Safari5.1+ */  background: -o-linear-gradient(top,  #a5cd4e 0%,#6b8f1a 100%); /* Opera 11.10+ */  background: -ms-linear-gradient(top,  #a5cd4e 0%,#6b8f1a 100%); /* IE10+ */  background: linear-gradient(top,  #a5cd4e 0%,#6b8f1a 100%); /* W3C */  
    }  /* Blue Color */  .blue {  color: #19667d;  background: #70c9e3; /* Old browsers */  background: -moz-linear-gradient(top,  #70c9e3 0%, #39a0be 100%); /* FF3.6+ */  background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#70c9e3), color-stop(100%,#39a0be)); /* Chrome,Safari4+ */  background: -webkit-linear-gradient(top,  #70c9e3 0%,#39a0be 100%); /* Chrome10+,Safari5.1+ */  background: -o-linear-gradient(top,  #70c9e3 0%,#39a0be 100%); /* Opera 11.10+ */  background: -ms-linear-gradient(top,  #70c9e3 0%,#39a0be 100%); /* IE10+ */  background: linear-gradient(top,  #70c9e3 0%,#39a0be 100%); /* W3C */  
    }  /* Gray Color */  .gray {  color: #515151;  background: #d3d3d3; /* Old browsers */  background: -moz-linear-gradient(top,  #d3d3d3 0%, #8a8a8a 100%); /* FF3.6+ */  background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#d3d3d3), color-stop(100%,#8a8a8a)); /* Chrome,Safari4+ */  background: -webkit-linear-gradient(top,  #d3d3d3 0%,#8a8a8a 100%); /* Chrome10+,Safari5.1+ */  background: -o-linear-gradient(top,  #d3d3d3 0%,#8a8a8a 100%); /* Opera 11.10+ */  background: -ms-linear-gradient(top,  #d3d3d3 0%,#8a8a8a 100%); /* IE10+ */  background: linear-gradient(top,  #d3d3d3 0%,#8a8a8a 100%); /* W3C */  
    }  

     

更多推荐

html中button的立体效果圆角

本文发布于:2024-03-10 15:41:52,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1728369.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:圆角   效果   html   button

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!