css实现一个简单的扁平化按钮
程序员文章站
2022-03-13 20:25:01
...
我们先来看下按钮样式:
(推荐教程:CSS教程)
具体代码:
<button id="btn">打印</button> //js写法 $("#btn").css({ "font-family": "'微软雅黑','Helvetica Neue',Helvetica,Arial,sans-serif", "font-size": "13px!important", "height": "30px", "line-height": "18px!important", "padding": "3px 18px", "display": "inline-block", "vertical-align": "middle", "font-weight": "normal", "border-radius": "2px", "margin": "0 8px 0 3px", "border": "1px solid #3383da", "color": "#ffffff", "background-color": "#3383da" }); //css写法 #btn{ font-family: "'微软雅黑','Helvetica Neue',Helvetica,Arial,sans-serif"; font-size: 13px!important; height: 30px; line-height: 18px!important; padding: 3px 18px; display: inline-block; vertical-align: middle; font-weight: normal; border-radius: 3px; margin: 0 8px 0 3px; border: 1px solid #3383da; color: #ffffff; background-color: #3383da; cursor: pointer; }
以上就是css实现一个简单的扁平化按钮的详细内容,更多请关注其它相关文章!
上一篇: css中的单选怎么做