2016-12-22 88 views
-13

如何使CSS這個按鈕,是不是愚蠢暴露的背景圖像,並處它如何使對CSS按鈕

enter image description here

a { 
    margin-top: 15px; 
    display: block; 
    width: 372px; 
    height: 65px; 
    border-radius: 48px/34px; 
    background: linear-gradient(to left top, #ec643b, #e15b3a); 
    box-shadow: 0 -3px #dc3d18, 0 -5px #ff7f44, 0 -7px #fb7039; 
} 

<a href="#"></a> 
+1

添加你的代碼... – Abood

+0

請檢查此鏈接:-http://ivomynttinen.com/blog/going-crazy-with-css3-問題1 - 創建按鈕與線性背景邊框 –

回答

0

button{ 
 
    width: 401px; 
 
    height: 75px; 
 
    border-radius: 35px; 
 
    background: #db5035; 
 
    box-shadow: inset 0px 0px 12px 5px #de3d16; 
 
    border: 0px; 
 
    border-top: 5px solid #ff8841; 
 
    } 
 
body{ 
 
    background:#000; 
 
    }
<button></button>

+0

@ G_test_00現在檢查 –

+0

@ G_test_00可能這是適合你的,現在檢查它 –

0

div { 
 
    margin: 10%; 
 
} 
 
a { 
 
    margin-top: 15px; 
 
    display: block; 
 
    width: 359px; 
 
    border-radius: 50px; 
 
    background: linear-gradient(to left top, #ec643b, #e15b3a); 
 
    box-shadow: 0 -3px #dc3d18, 0 -5px #ff7f44, 0 -7px #fb7039; 
 
    text-align: center; 
 
    color: black; 
 
    text-decoration: none; 
 
    vertical-align: middle; 
 
    padding: 25px; 
 
}
<div> 
 
<a href="#">Submit</a> 
 
</div>

+0

好吧,我很糟糕,你在找什麼,因爲你的樣式似乎工作正常。 – aavrug

0

你應該叫一個按鈕<button ID='btnone'>Submit</button> 接下來的.css文件,你應該記得btnone像:

#btnone { 
Enter code here 
} 

我用ulli創建菜單按鈕。

2

有兩種方法通過錨點或按鈕顯示按鈕。

試試這個:


 

 
a { 
 
    \t background: #fb9600; 
 
    \t box-shadow: 1px 1px 3px inset; 
 
     \t color: #fff; 
 
     \t padding: 8px; 
 
     \t transition: background-color 0.4s linear 0s; 
 
     \t width: 100%; 
 
    \t max-width:150px; 
 
    } 
 
    
 
    
 
    
 

 

 

 
    button { 
 

 
    \t background: #fb9600; 
 
    \t box-shadow: 1px 1px 3px inset; 
 
     \t color: #fff; 
 
     \t padding: 8px; 
 
     \t transition: background-color 0.4s linear 0s; 
 
     \t width: 100%; 
 
    \t max-width:150px; 
 
    }
<a href="#">NEXT</a> 
 
<h5>Next solution</h5> 
 
<button>NEXT</button>