当前位置: 移动技术网 > IT编程>网页制作>技巧 > uniapp——小程序button按钮各种默认样式,修改按钮的默认样式

uniapp——小程序button按钮各种默认样式,修改按钮的默认样式

2020年07月24日  | 移动技术网IT编程  | 我要评论
一、按钮的默认样式// 默认样式button {position:relative;display:block;margin-left:auto;margin-right:auto;padding-left:14px;padding-right:14px;box-sizing:border-box;font-size:18px;text-align:center;text-decoration:none;line-height:1;border-radiu

一、按钮的默认样式

// 默认样式
button {
	position:relative;
	display:block;
	margin-left:auto;
	margin-right:auto;
	padding-left:14px;
	padding-right:14px;
	box-sizing:border-box;
	font-size:18px;
	text-align:center;
	text-decoration:none;
	line-height:1;
	border-radius:5px;
	-webkit-tap-highlight-color:transparent;
	overflow:hidden;
	color:#000000;
	background-color:#fff;
}
// 边框样式
button::after{
	  border: 0;
}
// 禁用时样式
button[disabled] {
	  background-color: #fff;
	  color: #666;
}
// 点击时样式
.button-hover {
	color:rgba(0, 0, 0, 0.6);
	background-color:#fff;
}

二、清除按钮的默认样式(小程序也适用)

css样式:

button::after {
	 border: none;
}

html代码

<button hover-class='none'>发表</button>

本文地址:https://blog.csdn.net/World_Mei/article/details/107526174

如您对本文有疑问或者有任何想说的,请点击进行留言回复,万千网友为您解惑!

相关文章:

验证码:
移动技术网