如何使用CSS在按钮上添加彩色边框?
要添加彩色边框,请使用CSSborder属性。
示例
您可以尝试运行以下代码以添加彩色边框。
<!DOCTYPE html>
<html>
<head>
<style>
.button {
background-color: yellow;
color: black;
text-align: center;
font-size: 15px;
padding: 20px;
border-radius: 15px;
border: 3px dashed blue;
}
</style>
</head>
<body>
<h2>Result</h2>
<p>Click below for result:</p>
<button class = "button">Result</button>
</body>
</html>热门推荐
7 带马的祝福语简短
10 中秋骚气祝福语简短情人
11 新年祝福语姨姨简短
12 客户去旅游祝福语简短
13 古风考试祝福语 唯美简短
14 送同事出院祝福语简短
15 新年祝福语2026最简短
16 公司过年祝福语简短优美
17 企业老板文案祝福语简短
18 离别赠言离职祝福语简短