我正在着陸頁面上供個人使用,但我遇到了問題。我有一個邊界半徑的div,它叫做.popOut。邊框半徑適用於div的底部,但不適用於標題部分,爲什麼?我該如何解決這個問題?此外,如果你知道如何使箱形陰影變得更輕一點,而不是那麼黑暗,那就太棒了!謝謝!border-radius將不適用於div頂部
代碼:
HTML:
*{margin:0; padding:0;}
body{
\t background: #CCC;
\t color:#000305;
\t font-size: 87.5%;
\t font-family: Arial, 'Lucida Sans Unicode';
\t line-height: 1.5;
\t text-align: left; \t
}
.body{
\t margin: 0 auto;
\t width: 70%;
\t background:#ebebeb;
\t margin:auto;
}
.mainBack{
\t margin:auto;
\t background:white;
\t width:600px;
\t height:650px;
}
.popOut{
\t background:white;
\t width:80%;
\t height:600px;
\t margin:auto;
\t box-shadow:0px 0px 15px 0px;
\t border-radius:6px;
\t position:relative;
\t top:30px;
}
.mainHeader{
\t background:linear-gradient(#465BF6,#3149F2);
\t width:100%;
\t height:100px;
}
<html>
\t <head>
\t \t <meta charset="UTF-8">
\t \t <title>
\t \t \t Welcome!
\t \t </title>
\t \t <script type="text/javascript" src="jquery.js">
</script>
\t \t <script type="text/javascript" src="script.js">
</script>
\t \t <link rel="stylesheet" href="style.css" type="text/css">
\t </head>
\t <body class="body">
\t \t <div class="mainBack"> \t
\t \t \t <div class="popOut">
\t \t \t \t <div class="mainHeader"></div>
\t \t \t \t <div class="mainArea"></div>
\t \t \t \t <div class="mainAreaB"></div>
\t \t \t \t <div class="mainFooter"></div>
\t \t \t </div> \t
\t \t </div>
\t </body>
</html>
只需複製並粘貼到文本文件 – 2015-04-01 00:12:00