【问题标题】:Positioning problems with internet explorer (basic CSS)Internet Explorer 的定位问题(基础 CSS)
【发布时间】:2013-06-26 20:28:45
【问题描述】:

我正在尝试创建一个像 http://www.spookycraft.net/ 这样的网站,每当我在 IE 中运行我的网站时,它看起来很糟糕,所有内容都被推到左侧并且所有图像都被分开,在 Chrome 和 Firefox 中它们看起来很完美(就像所有居中一样,过渡就在那里)这是小提琴 http://jsfiddle.net/EuRJE/

这里是测试站点:http://www.wandernetwork.com/ 这是代码: 还请记住,我有点新手,所以如果您对我有任何指示或其他提示,他们将不胜感激。

<head>
    <meta charset='UTF-8'>
    <title>Wandercraft Network</title>
    <style media="screen" type="text/css">
        #page-wrap {
            width:620px;
            margin:0px auto;
        }
        .slide-up-boxes a {
            display:block;
            width:300px;
            height:300px;
            background: #eee;
            overflow:hidden;
        }
        .slide-up-boxes h5 {
            height:300px;
            width:300px;
            text-align:center;
            line-height:150px;
            -webkit-transition: margin-top 0.3s linear;
            background-color:#white;
        }
        .slide-up-boxes a:hover h5 {
            margin-top:-300px;
        }
        .slide-up-boxes div {
            text-align:center;
            height:300px;
            width:300px;
            opacity:0;
            background-color:orange;
            -webkit-transform: rotate(6deg);
            -webkit-transition: all 0.2s linear;
        }
        .slide-up-boxes a:hover div {
            -webkit-transform: rotate(0);
            opacity:1;
        }
        .slide-up-boxes {
            margin:5px;
            width:300px;
            float:left;
        }
        .banner {
            margin:0px auto;
            display:block;
            padding:15px;
            width:1000px;
            height:300px;
        }
        /* Limit the width of the tray to 30px to make it stack vertically*/
        #enjin-tray {
            max-width: 30px;
            margin: 0;
            bottom: 175px;
        }
        #enjin-tray li#notificationpanel {
            border-radius: 3px;
        }
        #enjin-tray ul li.tray-item {
            border-style: solid;
            border-width: 1px;
        }
        #notificationpanel .notification-icon.apps {
            background-position: -84px 3px;
        }
        #notificationpanel .notification-icon.general {
            background-position: -54px 3px;
        }
        #notificationpanel .notification-icon.messages {
            background-position: -25px 3px;
        }
        #notificationpanel .notification-icon.dashboard {
            display: none;
        }
        #enjin-tray li#notificationpanel .subpanel {
            width: 380px;
            bottom: 0;
        }
        #enjin-tray #notificationpanel .subpanel.general {
            right: 40px;
        }
        #enjin-tray #notificationpanel .subpanel.messages {
            right: 40px;
        }
        #enjin-tray .subpanel {
            right: 40px;
        }
        #enjin-tray #notificationpanel .subpanel.apps .faux-icon {
            display: none;
        }
        #enjin-tray #notificationpanel .subpanel.general .faux-icon {
            display: none;
        }
        #enjin-tray #notificationpanel .subpanel.messages .faux-icon {
            display: none;
        }
        #messages-notification-tip {
            bottom: 231px !important;
            right: 35px !important;
        }
        #general-notification-tip {
            bottom: 205px !important;
            right: 35px !important;
        }
        #apps-notification-tip {
            bottom: 180px !important;
            right: 35px !important;
        }
        .triangle {
            display: none;
        }
        #enjin-tray-messaging {
            display: none;
        }
    </style>
</head>

<body>
    <img src="https://dl.dropboxusercontent.com/u/85261154/WN_Banner.png" border="0px" class="banner">
    <div id="page-wrap">
        <section class="slide-up-boxes"> <a href="www.reddit.com">
    <img src="https://dl.dropboxusercontent.com/u/85261154/PVP.png">
    <div> 
    <h5> <img src="http://www.backbonetechnology.com/media/blog-html5-logo.png"> </h5>
     </div>
    </a>

        </section>
        <section class="slide-up-boxes"> <a href="www.reddit.com">
    <img src="https://dl.dropboxusercontent.com/u/85261154/Kingdoms.png">
    <div> 
    <h5> <img src="http://www.backbonetechnology.com/media/blog-html5-logo.png"> </h5>
     </div>
    </a>

        </section>
        <section class="slide-up-boxes"> <a href="www.reddit.com">
    <img src="https://dl.dropboxusercontent.com/u/85261154/Survival.png">
    <div> 
    <h5> <img src="http://www.backbonetechnology.com/media/blog-html5-logo.png"> </h5>
     </div>
    </a>

        </section>
        <section class="slide-up-boxes"> <a href="www.reddit.com">
        <img src="https://dl.dropboxusercontent.com/u/85261154/Factions.png">
        <div> 
        <h5> <img src="http://www.backbonetechnology.com/media/blog-html5-logo.png"> </h5>
         </div>
        </a>

        </section>
        <div style="clear:both;"></div>
    </div>
</body>

如果我找到答案,任何帮助将不胜感激,我一定会更新这篇文章,感谢您的阅读。

【问题讨论】:

  • 欢迎来到 Web 开发世界,IE 是你的噩梦
  • 可以在IE8中确认是toast

标签: css html internet-explorer google-chrome


【解决方案1】:

您使用的是哪个版本的 IE?您的页面在 IE10 上看起来不错。 如果您运行的是旧版本,我无法帮助您,但请看一下: Imitate CSS3 transition in IE?

-webkit-transition 无法在 IE 上运行。

【讨论】:

  • 我知道我正在为 chrome 和 firefox 优化它,是的,在 IE8 中它很糟糕,但在 IE10 中它很好,所以我不会担心它,谢谢你把有时间阅读我的帖子并写下答案。
猜你喜欢
  • 2023-03-31
  • 1970-01-01
  • 2018-05-22
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2019-01-12
相关资源
最近更新 更多