盘旋时从按钮上删除丑陋的白色阴影

发布于 2025-01-25 23:05:37 字数 737 浏览 3 评论 0原文

每当我徘徊在创建的按钮上时,它都会有一个白色,在过渡中看起来很丑。我需要帮助来删除此问题。

该按钮具有两个不同的CSS块:一个用于按钮本身,另一个块为.morb_button对于不同网页上的同一按钮。

button {
      background-color: #961a75;
      border-radius: 5px;
      color: white;
      padding: 15px 32px;
      text-align: center;
      display: inline-block;
      font-size: 25px;
      border:none;
      box-shadow: 1px 1px 3px #323d73;
      cursor:pointer;
      transition-duration: 0.2s;
      font-family: Gill Sans
}

button:hover {
      background-color: #cc5caf; 
      color: white;
      box-shadow: 0px 0px 0px
}

.morb_button {
      background-color:#022b27;
      box-shadow: 2px 2px 3px #4a0404
}

.morb_button:hover {
      background-color: #03524a;
}

Whenever I hover over my button that I created, it has a white which looks ugly in the transition. I need help to remove this.

The button has two different blocks of css: one for the button itself and other block is .morb_button for the same button on a different webpage.

button {
      background-color: #961a75;
      border-radius: 5px;
      color: white;
      padding: 15px 32px;
      text-align: center;
      display: inline-block;
      font-size: 25px;
      border:none;
      box-shadow: 1px 1px 3px #323d73;
      cursor:pointer;
      transition-duration: 0.2s;
      font-family: Gill Sans
}

button:hover {
      background-color: #cc5caf; 
      color: white;
      box-shadow: 0px 0px 0px
}

.morb_button {
      background-color:#022b27;
      box-shadow: 2px 2px 3px #4a0404
}

.morb_button:hover {
      background-color: #03524a;
}

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

但可醉心 2025-02-01 23:05:37

您已经在摘要中使用了两次属性box-shadow。删除其中的任何一个以解决此问题。

box-shadow: 0px 0px 0px; 
box-shadow: 2px 2px 3px #4a0404;

You have used the property box-shadow twice in the snippet. Remove either of them to fix this.

box-shadow: 0px 0px 0px; 
box-shadow: 2px 2px 3px #4a0404;
所有深爱都是秘密 2025-02-01 23:05:37

删除此规则,因为它是将白色阴影赋予按钮的规则。

box-shadow: 2px 2px 3px #4a0404;

Remove this rule, because it's the one that gives the white shadow to the button.

box-shadow: 2px 2px 3px #4a0404;
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文