Creating CSS Buttons
2005-02-15 01:51
393 查看
Creating CSS Buttons
Working Demo:a.but:link, a.but:visited
{
float: left;
margin: 2px 5px 2px 5px;
padding: 2px;
width: 100px;
border-top: 1px solid #cccccc;
border-bottom: 1px solid black;
border-left: 1px solid #cccccc;
border-right: 1px solid black;
background: #cccccc;
text-align: center;
text-decoration: none;
font: normal 10px Verdana;
color: black;
}
a.but:hover
{
background: #eeeeee;
}
a.but:active
{
border-bottom: 1px solid #eeeeee;
border-top: 1px solid black;
border-right: 1px solid #eeeeee;
border-left: 1px solid black;
}
Button 1Button 2Button 3
The Cascading Style Sheet (CSS) definition provides several so-called "pseudo-classes". These are classes that modify all occurences of a given style definition.
They take the form:
|
1) link
2) visited
3) hover
4) active
The only one that perhaps needs further explanation is "active". It refers to a link in the process of being clicked. The mouse is "down", but hasn't yet been released.
By setting the background, spacing, and border properties of these pseudo-classes, you can make your hyperlinks look and behave like buttons.
The code is below:
|
相关文章推荐
- 纯CSS buttons
- Creating Sencha Touch Toolbar Buttons
- CSS round buttons
- Bootstrap 基础CSS - 按钮(Buttons)
- Pure CSS Buttons – Good Button Style and No Images
- [Drupal] Creating Checkboxes, Radio Buttons, or Select Lists
- An Introduction to the Basics of Modern CSS Buttons
- css中Buttons样式最佳设置
- pure.css 源码之 buttons 篇
- dpc:Creating a DataBound List of Radio Buttons--预览
- Creating Round SysMenu Buttons
- Creating Vista Gadgets: Using HTML, CSS and JavaScript with Examples in RSS, Ajax, ActiveX (COM) and
- buttons.css——可以与bootstrap融合的按钮样式库
- DPC:Creating a DataBound List of Radio Buttons--PA
- Creating Custom share buttons: Facebook, Twitter, Google+
- 边框动画 Creating a Border Animation Effect with SVG and CSS 动画边框,很不错!
- Styling FX Buttons with CSS
- CREATING ROUND SWING BUTTONS 2
- Creating corner with different angle by using css and js
- How to make sexy buttons with CSS