html - 无法使用 CSS 更改按钮的属性

标签 html css

这是我的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/

相关文章:

html - 固定覆盖动态内容+滚动

html - CSS3 : Give height and width to background image

html - 从 Angular 2 Typescript 播放 HTML 5 视频

javascript - AJAX 调用后单击更改变量

html - 图像未使用 % 调整到 parent 或祖 parent 的大小

Css 类 : menu pop up dont work using . 事件

html - css: li 元素在水平方向的奇怪和困惑的布局

javascript - 最小化DOM访问以使页面更具响应性

javascript - 偏移量不能将 div 返回到 0,0?

jquery - 单击按钮更改元素 CSS 样式