【问题标题】:Weird shadow problem in Safari on website网站上 Safari 中奇怪的阴影问题
【发布时间】:2023-02-19 15:25:49
【问题描述】:

我已经建立了一个网站,但它在 Safari 中的菜单表现得很古怪。请看下面的视频,我在那里展示了问题。它仅在 Safari 中,所有其他浏览器都运行良好

Safari 中问题的视频可以在这里看到https://vimeo.com/757367403

这是我的 CSS,有人知道解决这个问题的一两个技巧吗?

@import url('https://fonts.googleapis.com/css?family=Lato:400,700');

.elementor-nav-menu {
    align-items: center;
}

.elementor-nav-menu * {
    font-family: "Lato",  sans-serif !important; 
    
}

html[lang="kl-kl"] .elementor-nav-menu > li:nth-child(4) a {
    font-size:16px!important;
    padding: 15px 0px!important;
}

.elementor-nav-menu > li:first-child {
    background-color: #00aeef;
    zoom: 0.85;
}

.elementor-nav-menu > li:nth-child(2n) {
    background-color: #ef6500!important;
    width:170px!important;
    height:170px!important;
    zoom:0.9!important;
}

.elementor-nav-menu > li a {
    flex-grow: 0!important;
}

.elementor-nav-menu > li:nth-child(7n) {
    background-color: #e8b736!important;
    zoom:0.85;
}
.elementor-nav-menu > li:nth-child(3) {
    background-color: #e8b736!important;
    width:220px;
    height:220px;
    padding:0 10px!important;
}

.elementor-nav-menu > li:nth-child(4n) {
    background-color: #66cc9a!important;
    zoom:0.85;
}
html[lang="kl-kl"] .elementor-nav-menu > li:nth-child(4n) {
    background-color: #66cc9a!important;
    zoom:1.05!important;
    padding:0 0px!important;

    
}

.elementor-nav-menu > li:nth-child(4)   {
        margin:0 auto;
}

.elementor-nav-menu > li:nth-child(5n){
    background-color: #00aeef;
    zoom:1.1;
}

.elementor-nav-menu > li:nth-child(6) {
    width:180px!important;
    height:180px!important;
}
.elementor-nav-menu > li:nth-child(5) {
    width:170px!important;
    height:170px!important;
}

.elementor-nav-menu > li {
        -moz-border-radius: 70px; 
   -webkit-border-radius: 70px; 
    border-radius: 50%;
        background-size: cover;
        background-repeat: none;
      width:139px;
        height:139px;
        text-align:center;
        margin:0 10px!important;
    
      display: flex; /* or inline-flex */
    align-items: center; 
    justify-content: center;
    
      filter: drop-shadow(0px 0px 15px rgba(0, 0, 0, 0.75));
}

.elementor-nav-menu > li a {
    color:#fff!important;
    font-size: 18px!important;
    word-wrap: break-word!important;
    word-break: break-word!important;
    white-space: normal!important;
    line-height:26px;
    text-align:center;
}
.elementor-nav-menu > li a:hover {
    line-height:30px;
}

.elementor-nav-menu li a .sub-arrow {
    display:none;
}

.elementor-nav-menu > .sub-menu:nth-child(3) {
    background-color:red;
}

.elementor-nav-menu--dropdown li a {
    justify-content: center;
}

.elementor-nav-menu--dropdown {
    -webkit-border-radius: 15px;
  -moz-border-radius: 15px;
  border-radius: 15px;
    will-change: filter;
}

.elementor-nav-menu > li:nth-child(2) ul {
    width: 300px!important;
    margin-top: 55px!important;
    background-color: #ef6500!important;
}

.elementor-nav-menu > li:nth-child(3) ul {
    width: 300px!important;
    background-color: #e8b736!important;
    margin-top: 13px!important;
}

.elementor-nav-menu > li:nth-child(4) ul {
    width: 300px!important;
    margin-top: 55px!important;
    background-color: #66cc9a!important;
}

.elementor-nav-menu > li:nth-child(4) ul {
    width: 300px!important;
    margin-top: 50px!important;
}

.elementor-nav-menu > li:nth-child(5) ul {
    width: 300px!important;
    margin-top: 25px!important;
}

.elementor-sub-item:hover,
.elementor-sub-item.elementor-item-active {
    background-color: transparent!important;
    text-decoration: underline!important;
}

【问题讨论】:

  • 网站网址?检查并查看问题所在将很容易。移除滤镜:drop-shadow(0px 0px 15px rgba(0, 0, 0, 0.75)); li 的财产,看看它是否适合你
  • 该站点是 nakuusa.gl - 如果我删除该过滤器,所有阴影都会一起消失。

标签: css wordpress elementor


【解决方案1】:

尝试添加

-webkit-appearance: none;

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多