html - 更改弹出窗口的默认关闭按钮
问题描述
一旦用户发送他的表单,我就会出现这个弹出式感谢消息。这是弹出窗口的 HTML:
<div id="pfcf-popup" style="width: 443px; height: 261px; background: url("") right top / cover no-repeat rgb(255, 255, 255); color: rgb(0, 0, 0) !important; top: 541px; left: 739px; display: block;" class="modal-box">
<a href="#" class="js-modal-close close">×</a>
<div class="modal-body">
<span style="color:#000000">
<p style="text-align: center;">
<img class="size-medium wp-image-707 aligncenter" src="http://mayabarber.co.il/wp-content/uploads/2018/06/messagesent-300x63.png" alt="" width="300" height="63">
<span style="color: #001a71; font-family: heebo; font-size: 1.563em;">אצור קשר בהקדם</span>
</p>
</span>
</div>
</div>
.js-modal-close close 是 X 按钮。
我尝试使用以下 CSS 来用我的按钮替换默认的关闭按钮,但它不起作用。
#pfcf-popup a.close {
content: url('
http://mayabarber.co.il/wp-content/uploads/2018/06/maya_landing_1920wide-11.svg') !important;
display: inline-block;
height: 35px !important;
width: 35px !important;
max-width: 35px !important;
max-height: 35px !important;
z-index: 3;
}
谁能告诉我我的代码有什么问题?您也可以尝试在mayabarber.co.il上发送一份测试表进行检查。
解决方案
而不是应用 content:url(); 将其应用为背景图像
#pfcf-popup a.close {
display: inline-block;
height: 35px !important;
width: 35px !important;
background: #fff url(http://mayabarber.co.il/wp-content/uploads/2018/06/maya_landing_1920wide-11.svg);
}
推荐阅读
- html - 垂直对齐弹性项目
- javascript - React:如何更新数组映射中的对象
- php - 比较当前数组元素与前一个数组元素
- python - 在 scipy.optimize. 中使用回调函数在一定时间后停止进程
- windows - 如何使用 Windows 批处理脚本识别操作系统是 64 位还是 32 位?
- php - 使用第一个变量 isset()
- html - 使用原始 html 表单获取 Django CSRF 错误
- symfony - 无法使用 webpack-encore 编译材料组件
- php - 如何在某个命名空间中打开 .json 文件
- amazon-cloudfront - CloudFront Origin 基本授权