jquery - 从 Popover 中移除阴影

标签 jquery html css jquery-ui jquery-mobile

我正在使用 JQuery-mobile 为我的按钮实现一个弹出框。我的目标是去除弹出窗口后面的阴影。我怎样才能做到这一点?

enter image description here

引用: http://api.jquerymobile.com/popup/#option-shadow

.ui-content {
  shadow: false
}
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.css">
<script src="https://code.jquery.com/jquery-1.11.3.min.js"></script>
<script src="https://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.js"></script>


<div data-role="main" class="ui-content">

  <a href="#myPop1" data-rel="popup" class="ui-btn ui-btn-inline">Click Me to display popup</a>
  <a href="#myPop1" data-rel="popup" class="ui-btn ui-btn-inline">Click Me to display popup</a>
  <a href="#myPop1" data-rel="popup" class="ui-btn ui-btn-inline">Click Me to display popup</a>
  <a href="#myPop1" data-rel="popup" class="ui-btn ui-btn-inline">test</a>


  <div data-role="popup" id="myPop1" class="ui-content" data-arrow="l,t">
    <p>Awesome <strong>popup!</strong></p>
  </div>


</div>

最佳答案

它添加了框阴影,因此您可以将其删除。

#myPop1 {
    box-shadow: none;
}

或者通常情况下,如果您想完全覆盖它:

.ui-overlay-shadow {
    box-shadow: none;
}

还要注意它也会添加文本阴影,因此您可以根据需要以相同的方式删除它

关于jquery - 从 Popover 中移除阴影,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43374641/

相关文章:

html - 如何在html中将图像的位置设置为居中

jquery - 使用 CSS 和 jQuery 的横向滚动菜单

javascript - 用图像替换警报功能

javascript - 检查输入值是否不相同 onBlur

html - 如何切割溢出的div css

html - 将(CSS 旋转)元素与其容器的左侧对齐 - HTML/CSS

html - 在页面中间将图像组合在一起

javascript - 托管的 JS 文件未加载到 android webview 中

javascript - 复制元素时,jQuery 单击事件不会触发

html - 如何在 HTML 中发送 PUT/DELETE 请求?