这是我的index.html
<!DOCTYPE html>
<html lang="en">
<head>
<script src="javascript.js" type="text/javascript" charset="utf-8" async defer></script>
<meta charset="UTF-8">
<title>Random quotes machine</title>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body onload="startTime()">
<div id="timer"></div>
<div id="quotesGoHere">
<!--Quotes will be displayed here-->
</div>
<button type="button" id="buttonAtt" onclick="newQuote()">New Quote</button>
</body>
</html>
这是我的按钮属性。还有很多,我剪掉了。
#buttonAtt {
-moz-box-shadow:inset 0px 1px 0px 0px #ffffff;
-webkit-box-shadow:inset 0px 1px 0px 0px #ffffff;
box-shadow:inset 0px 1px 0px 0px #ffffff;
background-color:transparent;
-webkit-border-top-left-radius:0px;
-moz-border-radius-topleft:0px;
border-top-left-radius:0px;
-webkit-border-top-right-radius:0px;
-moz-border-radius-topright:0px;
border-top-right-radius:0px;
-webkit-border-bottom-right-radius:0px;
-moz-border-radius-bottomright:0px;
border-bottom-right-radius:0px;
-webkit-border-bottom-left-radius:0px;
-moz-border-radius-bottomleft:0px;
border-bottom-left-radius:0px;
text-indent:0;
border:2px solid #ffffff;
display:inline-block;
但是我的按钮的属性仍然是默认的,它没有改变任何东西。你们能教我吗?
最佳答案
我找到了一种解决方案,但它没有意义。我在旧的上面放了一个空的 CSS 属性:
#buttonAtt{}
它运行良好,不知道为什么......
关于html - 无法使用 CSS 更改按钮的属性,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49096362/