2014-09-24 53 views
0

我目前有一个从基础的按钮,我想添加一个链接,但每次我这样做是要么删除按钮或不链接!很显然,我会非常喜欢这两个工作! 有人可以告诉我如何将链接添加到下面的按钮的代码!我知道这可能听起来很基本,但仍然在努力习惯基础!将基础按钮变为链接

<div class="clear10"></div> 
      <button class="rounded shadow">Get Started</button> 
     </div> 

回答

3

本应该做的

<link href="http://cdn.jsdelivr.net/foundation/5.4.3/css/foundation.css" rel="stylesheet"/> 
 

 

 
    <div class="clear10"> 
 
     <a href="your link" class="button rounded shadow">Get Started</a> 
 
    </div>

1

在这里,我给多一点灵活的代码

<div class="clear10"></div> 
    <button class="round-button"> 
    <a href="your link" class="linking">Get Started</a> 
    </button> 
    </div> 

CSS

.round-button { 
    display:block; 
    width:400px; 
    height:60px; 
    border-radius:20px; 
    text-align:center; 
    background: #464646; 
} 
.round-button:hover { 
    background: #262626; 
} 

.linking{ 
    font-size:20px; 
    font-weight:bold; 
    color:#fff!important; 
} 

试试这个FIDDLE