1

タグの横にあるスクロールバーを削除するのに問題があります。オーバーフローの追加について何か読んだことがあります:hidden属性ですが、属性を適用する方法(および適用する場所)についてはまだ疑問があります。あなたは私を助けることができます?

HTML:

<html>

<head>
    <title>Circle Motion</title>
    <link rel="stylesheet" type="text/css" href="styles.css" />
</head>

<body> 
    <div id="outer-wrapper">
        <div id="wrapper">

            <div id="top">  
            </div>

            <div id="box_1">
            <img src="chrome_400x400.png" />
            </div>

            <div id="box_2">
            </div>

        </div>
    </div>
</body>

CSS:

#outer-wrapper {
height: 100%;
width: 1000px;
margin: 0px auto;
background-color: EAFFDB;
-moz-border-radius: 15px;
border-radius: 15px;
}

#wrapper {
height: 100%;
width: 960px;
margin: 0px auto;
background-color: EAFFDB;
overflow: auto;
}

#top {
width: 900px;
height: 110px;
margin-top: 35px;
margin-left: auto;
margin-right: auto;
margin-bottom: 35px;
background-color: white;
-moz-border-radius: 15px;
border-radius: 15px;
}

#box_1 {
width: 430px;
height: 430px;
background-color: black;
-moz-border-radius: 15px;
border-radius: 15px;
float:left;
margin-left: 30px;
margin-bottom: 30px;
text-align: center;
}

#box_1 img {
margin: 15px 0px;
}

#box_2 {
width: 430px;
height: 430px;
background-color: white;
-moz-border-radius: 15px;
border-radius: 15px;
float:right;
margin-right: 30px;
margin-bottom: 30px;
text-align: center;
}       

#box_1 img {
margin: 15px 0px;
}
4

3 に答える 3

3

#wrapperそれはあなたのスタイリングにあるべきです。

#wrapper {
height: 100%;
width: 960px;
margin: 0px auto;
background-color: #EAFFDB; /*note you were missing this hashtag before the color, which might work, but this is safer*/
overflow: hidden; /*this was auto, while it should be hidden*/
}

これがお役に立てば幸いです。

于 2012-09-02T17:15:23.610 に答える
2

はい、overflow:hiddenスクロールバーを削除する必要のある要素に適用する必要があります。

また、16進カラーコードの前にハッシュタグ(#)がありません。

于 2012-09-02T17:18:09.790 に答える
2

クラスoverflow: hidden;の代わりにoverflow: auto;使用する#wrapper

于 2012-09-02T17:18:40.877 に答える