如何樣式提交表單按鈕?這是可能的,或者我應該使用圖片(PNG)?我的意思是這樣的:如何樣式提交按鈕?
4
A
回答
11
那麼,你應該先了解CSS或層疊樣式表。他們習慣於設計我們的網頁。使用CSS你可以設計你的按鈕風格。
就比如:
CSS是什麼?
- CSS表示層疊樣式表
- 樣式定義如何顯示HTML元素
- 樣式添加到HTML 4.0解決問題
- 外部樣式表可以節省大量的工作
- 外部樣式表存儲在CSS文件中
您可以像這樣設計按鈕樣式:
input[type=submit] {
border-radius: 5px;
border: 0;
width: 80px;
height:25px;
font-family: Tahoma;
background: #f4f4f4;
/* Old browsers */
background: -moz-linear-gradient(top, #f4f4f4 1%, #ededed 100%);
/* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(1%, #f4f4f4), color-stop(100%, #ededed));
/* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, #f4f4f4 1%, #ededed 100%);
/* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, #f4f4f4 1%, #ededed 100%);
/* Opera 11.10+ */
background: -ms-linear-gradient(top, #f4f4f4 1%, #ededed 100%);
/* IE10+ */
background: linear-gradient(to bottom, #f4f4f4 1%, #ededed 100%);
/* W3C */
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#f4f4f4', endColorstr='#ededed', GradientType=0);
/* IE6-9 */
}
1
查找一些所謂的CSS。您可以定義一個類來定義字體,大小,邊框,半徑等任何元素
3
input[type="submit"]{your style here}
1
瀏覽器配備了大集的默認樣式,以使事情看起來很漂亮,如果風格不被網站設置。例如Firefox已經默認提交按鈕定義以下樣式:
input[type="submit"] {
-moz-appearance: button;
-moz-binding: none;
-moz-box-sizing: border-box;
-moz-user-select: none;
background-color: buttonface;
border: 2px outset buttonface;
color: buttontext;
cursor: default;
font: -moz-button;
line-height: normal;
padding: 0 6px;
text-align: center;
text-shadow: none;
white-space: pre;
}
1
你可以做到這一點的方式如下: -
input[type="submit"] {
/*
style code here
*/
}
2
try this
.button {
-moz-border-radius: 25px;
-moz-box-shadow: #6E7849 0px 0px 10px;
-moz-transition: all 0.5s ease;
-ms-transition: all 0.5s ease;
-o-transition: all 0.5s ease;
-webkit-border-radius: 25px;
-webkit-box-shadow: #6E7849 0 0 10px;
-webkit-transition: all 0.5s ease;
background-color: #6E7849;
background-image: -moz-linear-gradient(90deg, #B9C788, #6E7849);
background-image: -ms-linear-gradient(90deg, #B9C788, #6E7849);
background-image: -o-linear-gradient(90deg, #B9C788, #6E7849);
background-image: -webkit-linear-gradient(90deg, #B9C788, #6E7849);
background-image: linear-gradient(90deg, #B9C788, #6E7849);
border-radius: 25px;
border: 2px solid #4a5032;
box-shadow: #6E7849 0px 0px 10px;
color: #ffffff;
display: inline-block;
font-size: 4em;
margin: auto;
padding: 15px;
text-decoration: none;
text-shadow: #000000 5px 5px 15px;
transition: all 0.5s ease;
}
.button:hover {
padding: 15px;
}
OR
try your choice color combination button
http://www.cssdrive.com/css3button/
+0
我想現在邊界半徑是現在的標準沒有必要的-webkit-或-O-或-moz- :) –
1
如你願意,你可以風格的按鈕。與以前的答案一樣,您可以使用輸入[type =「submit」]來撬動選擇它的按鈕。
我建議你看看下面的鏈接:http://css3button.net/在這裏你將能夠自動生成使用許多CSS3屬性的按鈕。 根據您的交叉瀏覽需求,您還可以看看http://caniuse.com/來決定是否有意義使用這些屬性。否則,你仍然可以使用BG圖片:-)
問候
3
您可以使用CSS ... 在HTML頁面做它,你應該加入
<input type="submit" value="Send"/>
然後,你需要添加此文本在另一個css文件中的同一個HTML文件中。
<style>
input[type="submit"]{
/* change these properties to whatever you want */
background-color: #555;
color: #fff;
border-radius: 10px;
}
</style>
希望這將有助於你
相關問題
- 1. 如何樣式提交按鈕
- 2. 默認提交按鈕樣式表單
- 3. Zend Framework表單提交按鈕樣式
- 4. Internet Explorer提交按鈕樣式
- 5. 樣式HTML「提交」按鈕與圖像?
- 6. 樣式div像提交按鈕
- 7. 在IE中提交按鈕樣式
- 8. 如何樣式表單提交按鈕在CSS中?
- 9. 如何提交圖像提交按鈕
- 10. form_for提交按鈕,樣式按鈕是文本而不是按鈕
- 11. 如何設置提交按鈕作爲默認按鈕形式
- 12. 用提交按鈕的形式提交表單與幾個提交按鈕
- 13. 一個的樣式在Laravel的形式提交按鈕4
- 14. 最簡潔的方式爲formtastic提交按鈕設置樣式
- 15. 提交不提交按鈕
- 16. 提交按鈕不提交
- 17. 提交按鈕不提交
- 18. 提交按鈕不提交
- 19. 如何樣式按鈕?
- 20. 提交按鈕
- 21. 按鈕Href按按鈕提交按鈕
- 22. 如何創建彈出式按鈕的提示框以及提交按鈕?
- 23. 表單未按提交按鈕提交
- 24. 我怎樣才能使用CSS來提交提交按鈕?
- 25. 形式輸入按鍵提交或點擊提交按鈕
- 26. 樣式社交媒體按鈕與CSS?
- 27. CSS:提交按鈕樣式的輸入字段
- 28. IE 8提交按鈕樣式不工作
- 29. 刪除HTML按鈕的完整樣式/提交
- 30. Bootstrap CSS表格類是過度btn類提交按鈕樣式
沒錯完全有可能用CSS3,'邊境radius'和'gradients' –