HTML - 网站在IE浏览器中看起来是正确的但在Chrome中存在漏洞

时间:2013-12-11 10:17:10

标签: html css css3 google-chrome css-transitions

您可以找到网站here

在Chrome上: 当您将鼠标悬停在图标上时,图标会随机跳转一些像素, 语言栏太低了......

在IE上: 看起来和正常工作。

这里只是最重要的CSS

CSS:

#main
{
    position: relative;
    overflow: hidden;
}

#varjo {
box-shadow: 5px 5px 10px gray;
}

.panel
{
    position: relative;
}

/* Me */

    #me
    {
    }

        #me .pic
        {
            position: relative;
            display: block;
            border-left: 1px #E1E1E1 solid;
        }

            /*
                The pseudo element below applies a noise pattern to the "me" image. It's
                meant to help mask blurriness, but you can remove it if you don't like it.
            */



            #me .pic:before
            {
                content: '';
                position: absolute;
                top: 0;
                left: 0;
                background: url('images/overlay.png');
                width: 100%;
                opacity: 0.5;
                height: 100%;
                z-index: 1;
            }

    #lang
{
background: black;
opacity: 0.7;
width: 95%;
font-family: Poiret One;
transition: 0.5s opacity;
cursor: default;
position: fixed:
}

::selection {
color: green;
}

#lang:hover{
opacity: 1;
}

    #lang a
    {
        position: relative;
        display: inline-block;
        color: #fff;
        width: 1em;
        width: 10%;
        height: 1em;
        line-height: 0.9em;
        margin-right: 150px;
        transition: 0.2s color;
        white-space:nowrap;
    }

    #lang a:hover {
    color: lightgreen;
    }

        #lang a.icon:before
        {
            padding-right: 0;
        }
#nav
{
margin-top: 20px;
}

    #nav a
    {
        position: relative;
        display: inline-block;
        color: #fff;
        width: 1em;
        height: 1em;
        line-height: 0.9em;
    }

        #nav a.icon:before
        {
            padding-right: 0;
        }

    .fa
{
    text-decoration: none;
    transition: all 0.5s;
}

    .fa.solo
    {
    }

        .fa.solo span
        {
            display: none;
        }

    .fa:before
    {
        display:inline-block;
        font-family: FontAwesome;
        font-size: 1.25em;
        text-decoration: none;
        font-style: normal;
        font-weight: normal;
        line-height: 1;
        -webkit-font-smoothing:antialiased;
        -moz-osx-font-smoothing:grayscale;
    }

您可以在源代码中看到HTML:)

铬:

Chrome

IE:

IE

我认为我正在使用IE和Chrome的最新版本。 请帮忙,谢谢:)

2 个答案:

答案 0 :(得分:2)

似乎您的内容的垂直对齐导致...

1920 X 1080屏幕 - Chrome

enter image description here

1280 X 800屏幕 - Chrome

enter image description here

正如您所看到的,根据屏幕的大小,间距会发生变化 - (请查看滚动条)

您还可以在margin-top:元素中添加一些#nav。 类似的东西:

#nav {
   margin-top: 30px;
}

您网站上的其他重要更改是您在opacity: 0中设置了#nav .fa-film span。不透明度0允许显示您何时悬停(我想您只需要在用户悬停图标时显示该工具提示)。设置为display: none并将您的#nav a:hover span更改为

更有用
#nav a:hover span {
  display: inherit;
}

答案 1 :(得分:-1)

body {margin:0px; padding:0px;}添加到您的CSS