zoukankan      html  css  js  c++  java
  • Pure CSS Buttons – Good Button Style and No Images

    Pure CSS buttons that actually look good – is it a myth? These days, I don’t believe they are. Sometimes I’m too lazy to get onto photoshop and play around with designs until I work something good out, or I don’t feel that it’s worth it to hire a professional designer. If there’s one thing I do know though, it’s how to code a design in css. Here are some buttons that I designed purely in CSS, and I’ll give you the CSS for these buttons completely free ;) .

    BUTTONS THAT I MADE USING JUST CSS:

    CSS Button Style #1 – Inspired by Twitter

    EXAMPLE OF BUTTON STYLE #1

    CSS CODE FOR STYLE #1

    <style type="text/css">
    .styled-button-1 {
    	-webkit-box-shadow: rgba(0, 0, 0, 0.199219) 0px 1px 0px 0px;
    	background-color: #FA2;
    	border-radius: 5px;
    	border-bottom-color: #333;
    	border: none;
    	border- 0;
    	box-shadow: rgba(0, 0, 0, 0.199219) 0px 1px 0px 0px;
    	color: #333;
    	font-family: 'Helvetica Neue', Arial, sans-serif;
    	font-size: 16px;
    	font-weight: bold;
    	height: 32px;
    	padding: 4px 16px;
    	text-shadow: #FE6 0px 1px 0px;
    }
    </style>
    

    CSS Button Style #2

    EXAMPLE OF BUTTON STYLE #2

    CSS CODE FOR STYLE #2

    <style type="text/css">
    .styled-button-2 {
    	-webkit-box-shadow: rgba(0, 0, 0, 0.2) 0px 1px 0px 0px;
    	background-color: #7cceee;
    	border-radius: 5px;
    	border-bottom-color: #333;
    	border: 1px solid #61c4ea;
    	box-shadow: rgba(0, 0, 0, 0.2) 0px 1px 0px 0px;
    	color: #333;
    	font-family: 'Verdana', Arial, sans-serif;
    	font-size: 14px;
    	text-shadow: #b2e2f5 0px 1px 0px;
    	padding: 5px;
    }
    </style>
    

    CSS Button Style #3

    EXAMPLE OF BUTTON STYLE #3 – FACEBOOK STYLE

    CSS CODE FOR STYLE #3

    <style type="text/css">
    .styled-button-3 {
    	-webkit-box-shadow: rgba(0, 0, 0, 0.0.97) 0px 1px 0px 0px;
    	background-color: #5B74A8;
    	border: 1px solid #29447E;
    	font-family: 'Lucida Grande', Tahoma, Verdana, Arial, sans-serif;
    	font-size: 12px;
    	font-weight: bold;
    	padding: 2px 6px;
    	height: 28px;
    	color: #fff;
    	border-radius: 5px;
    }
    </style>
    

    CSS Button Style #4

    EXAMPLE OF BUTTON STYLE #4

    CSS CODE FOR STYLE #4

    <style type="text/css">
    .styled-button-4 {
    	-webkit-box-shadow: rgba(0, 0, 0, 0.0976562) 0px 1px 0px 0px;
    	background-color: #EEE;
    	border: 1px solid #999;
    	color: #666;
    	font-family: 'Lucida Grande', Tahoma, Verdana, Arial, Sans-serif;
    	font-size: 11px;
    	font-weight: bold;
    	padding: 2px 6px;
    	height: 28px;
    }
    </style>
    

    CSS Button Style #5

    EXAMPLE OF BUTTON STYLE #5

    CSS CODE FOR STYLE #5

    <style type="text/css">
    .styled-button-5 {
    	background-color: #ed8223;
    	color: white;
    	font-family: 'Helvetica Neue', sans-serif;
    	font-size: 18px;
    	line-height: 30px;
    	border-radius: 20px;
    	border: 0px;
    	text-shadow: #C17C3A 0px -1px 0px;
    	 120px;
    	height: 32px;
    }
    </style>
    

    I’m excited to hear which ones you think are the best, so let me know here in the comments, okay? If you’re comfortable using images in your design styles, then you might want to check out this post on adjustable css buttons from my friend Soh Tanaka ;)

    I have a related post on table css design styles that you may also appreciate.

    转:http://pythoughts.com/pure-css-buttons/

  • 相关阅读:
    js进阶 12-2 彻底弄懂JS的事件冒泡和事件捕获
    js进阶 12-1 jquery的鼠标事件有哪些
    css3-11 如何实现2D动画
    ECLIPSE IDEA 调音 1
    vim note(3)
    SyntaxHighlighter代码高亮插件
    POI使用汇总
    C和指针 (pointers on C)——第三章——数据
    写了一个初中同学——为了有效地完成现有的知识积累
    [DB][mybatis]MyBatis mapper文件引用变量#{}与${}差异
  • 原文地址:https://www.cnblogs.com/shuaixf/p/2513808.html
Copyright © 2011-2022 走看看