html - 制作重叠按钮

标签 html css

我想在按钮前面做一个翻盖……有什么想法吗?

.button {
    position:absolute;
    top:240px;
    left: 452.5px;
    width:110px;
    height:40px; 
    display: block;
    margin-bottom: 10px;
    text-align: center;
    line-height: 30px;
    margin: 20px;
    cursor: pointer;
    color: #fff;
    text-align: center;
    border: solid #009c93 1px;
    border-top-right-radius: 7px;
    border-bottom-right-radius: 7px;
    background: #009c93;
    text-shadow: 2px 2px #222222);
}

最佳答案

他们正在使用这个:

.button::before {
    content: '';
    position: absolute;
    border-width: 8px 8px 8px 0;
    border-style: solid solid solid none;
    border-color: transparent #D83C3C transparent;
    top: 12px;
    left: -6px;
}

顺便说一句。占位符与此无关!这是纯 CSS。

关于html - 制作重叠按钮,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16355683/

相关文章:

java - 我已在隐藏输入中发送值,并且也在该页面上看到它,但我在下一个 servlet 页面中获取空值 从上一页获取类别

html - 最小和最大宽度之间的文本容器的 CSS

javascript - 单击按钮时如何在js中获取事件按钮

css - 是否可以屏蔽 <div> 或用屏蔽图像覆盖文本?

html - 如何使这个 "img"元素表现得像在正常流中一样?

html - 在 HTML 中将类别移至最右侧,将文章移至左侧

html - 自定义复选框不适用于多个复选框

javascript - javascript 中的变量不会传递到表单

html - 使用 Jekyll 实现内容安全策略

css - IE 漏洞 : absolutely-positioned element with a non-transparent background colour