HTML   发布时间:2022-04-14  发布网站:大佬教程  code.js-code.com
大佬教程收集整理的这篇文章主要介绍了html – 在Safari中无法渲染最大宽度大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
check this fiddle

这就是它在Firefox和Chrome中的外观……这是我原来的布局.

这就是它在Safari中的外观,我想解决它.任何帮助,将不胜感激.

.top {
    BACkground: #edebe6;
    height: 80px;
}
.intop {

    max-width: 1080px;
    margin: 0 auto;
    display: table;
    width: 100%;
}
.logo {
    width: 20%;
    float: left;

}
.logo img {
    display: table-cell;
    vertical-align: middle;
    margin-top: 15px;
}
.svg-menu {
    display: none;
}
.nav-wrap {
    width: 68%;
    float: left;
    height: 80px;
    display: table;
}
ul.nav {
    list-style: none;
    float: right;
    margin-top: 23px;
    margin-right: 45px;

}
ul.nav li {
    display: inline-block;
    margin-left: 35px;
    text-transform: uppercase;
    font-size: 12px;
    font-weight: bold;
}
ul.nav li a {
    color: #403b33;
}
ul.nav li a:hover {
    BACkground: none;
    color: #d3643b;
}

ul.nav li.current-menu-item a {
    color: #d3643b;
    position: relative;
}
ul.nav li a::after {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin: auto;
    width: 60%;
    height: 1px;
    BACkground: #d3643b;
    content: '';
    opacity: 0;
    -webkit-transition: height 0.3s,opacity 0.3s,-webkit-transform 0.3s;
    -moz-transition: height 0.3s,-moz-transform 0.3s;
    transition: height 0.3s,transform 0.3s;
    -webkit-transform: translateY(-10pX);
    -moz-transform: translateY(-10pX);
    transform: translateY(-10pX);
}
ul.nav li a:hover::after,ul.nav li a:focus::after {
    height: 2px;
    opacity: 1;
    -webkit-transform: translateY(0pX);
    -moz-transform: translateY(0pX);
    transform: translateY(0pX);
}
ul.nav li.current-menu-item a:after {
    content: '';
    height: 2px;
    width: 60%;
    BACkground: #d3643b;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    margin: auto;
}
.top-cart {
    width: 12%;
    float: left;
    height: 80px;
    display: table;
    text-align: right;
    padding-right: 18px;
    BACkground: #83b4a4 url(images/cart.png) no-repeat 20px center;
}
.top-cart a {
    vertical-align: middle;
    display: table-cell;
    color: #fff;
    text-transform: uppercase;
    font-size: 14px;
    text-transform: uppercase;
    font-weight: bold;
    color: #fff;
}


@media only screen and (max-width: 1080pX) {
    .in-fea-home,#container,.logo {
        padding-left: 20px;
        padding-right: 20px;
    }    
    .top-cart {
        width: 65px;
        float: right;
        position: absolute;
        right: 0;
        padding: 0;
    }
    .top-cart a {
        margin-right: -25px;
        padding-right: 27px;
        padding-top: 14px;
    }.rhide {

        display: none;
    }
}
@media only screen and (max-width: 767pX) {

    .nav-wrap {

        display: none;
    }

    .logo {
        width: 100%;
        text-align: center;
    }

    .svg-menu {
        display: block;
        width: 20%;
        float: left;
        position: absolute;
        left: 15px;
        padding-top: 27px;
    }
    .footer {

        text-align: center;
    }
    #container ul.products li {
    width: 70%;
    margin: 0 auto;
}
.ff,.gff {
    margin-bottom: 55px;
}
}

@media only screen and (max-width: 534pX) {


}


/* Mobile PorTrait Size to Mobile Landscape Size (devices and browsers) */
@media only screen and (max-width: 479pX) {
   button.single_add_to_carT_Button {
    BACkground: #83b4a4;
    border: none;
    border-radius: 3px;
    padding: 10px 17px;
    padding-bottom: 9px;
    font-size: 13px;
    text-transform: uppercase;
    color: #fff;
    margin-left: 15px;
    font-weight: bold;
    display: block;
    float: left;
    margin-left: -120px;
    margin-top: 50px;
}

}

解决方法

从.logo img中删除display:table-cell,这应该可以解决所有浏览器上的所有问题.

大佬总结

以上是大佬教程为你收集整理的html – 在Safari中无法渲染最大宽度全部内容,希望文章能够帮你解决html – 在Safari中无法渲染最大宽度所遇到的程序开发问题。

如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。