两个框中的文本需要在左侧对齐。但是,即使我在CSS代码上将“center”更改为“left”,也没有什么区别。 JSFiddle
@charset "utf-8";
.box
{
width: 560px;
background-color:#CCC;
border-top-left-radius: 10px;
border-top-right-radius: 10px;
color:#000;
text-align:center;
border: 1px solid #000;
margin-right:auto;
margin-left:auto;
margin-top:15px;
font-size:24px;
}
.boxbot
{
width: 560px;
background-color:#CCC;
border-bottom-left-radius: 10px;
border-bottom-right-radius: 10px;
text-align:center;
border: 1px solid #000;
margin-right:auto;
margin-left:auto;
margin-top:3px;
font-size:16px;
}
.boxyoutube
{
width: 560px;
height: 345px;
background-color:#CCC;
border-bottom-left-radius: 10px;
border-bottom-right-radius: 10px;
text-align:center;
border: 1px solid #000;
margin-right:auto;
margin-left:auto;
margin-top:3px;
font-size:16px;
}
.boxbot2
{
width: 560px;
background-color:#CCC;
text-align:center;
border: 1px solid #000;
margin-right:auto;
margin-left:auto;
margin-top:3px;
font-size:16px;
}
.submit
{
width: 560px;
background-color:#CCC;
text-align:left;
border: 1px solid #000;
margin-right:auto;
margin-left:auto;
margin-top:3px;
font-size:16px;
}
body
{
alignment-adjust:central;
background-color:#CCC;
}
select{
width:auto;}
#wrapper
{
text-align:center;
}
答案 0 :(得分:0)
您需要从这两个类#wrapper
和.boxbot2
#wrapper
{
text-align:center; -- remove it
}
.boxbot2
{
width: 560px;
background-color:#CCC;
text-align:center; -- remove it
border: 1px solid #000;
margin-right:auto;
margin-left:auto;
margin-top:3px;
font-size:16px;
}
答案 1 :(得分:0)