调整大小时加扰元素

时间:2015-06-13 05:35:38

标签: html css

HTML:

<p style="margin-left:1250px; margin-top:70px;"><a href="">Go to the main website</a></p>

的CSS:

a {
    color: #000000;
    text-decoration: none;

}

html {
    background-color: #FFFFFF;
    -webkit-font-smoothing: antialiased;
}

body {
    margin: 0 auto;
    background-color: #ffffff;
    max-width: 100%;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 16px;
    line-height: 1.5em;
    color: #545454;
    background-color: #ffffff;
    text-align: center;
}

每当我重新调整浏览器窗口的大小时,请转到主网站&#34;正在变得混乱。 有什么帮助吗?

1 个答案:

答案 0 :(得分:0)

看看这是否有帮助

的CSS

a {
    color: #000000;
    text-decoration: none;

}

html {
    background-color: #FFFFFF;
    -webkit-font-smoothing: antialiased;
}

body {
    margin: 0 auto;
    background-color: #ffffff;
    max-width: 100%;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 16px;
    line-height: 1.5em;
    color: #545454;
    background-color: #ffffff;
    text-align: center;
}

.custom-class {
    text-align: right;
    margin-top:70px;
}

HTML

<p class="custom-class"><a href="">Go to the main website</a></p>