Home > Web Front-end > CSS Tutorial > CSS implements a simple flat button

CSS implements a simple flat button

王林
Release: 2020-09-18 17:43:33
forward
3518 people have browsed it

CSS implements a simple flat button

Let’s take a look at the button style first:

(Recommended tutorial: CSS tutorial)

CSS implements a simple flat button

Specific code:

<button id="btn">打印</button>

//js写法
$("#btn").css({
	"font-family": "&#39;微软雅黑&#39;,&#39;Helvetica Neue&#39;,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: "&#39;微软雅黑&#39;,&#39;Helvetica Neue&#39;,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;
}
Copy after login

The above is the detailed content of CSS implements a simple flat button. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:csdn.net
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template