开发者社区> 问答> 正文

同个css文件为什么会有些样式生效有些不生效?

最后两个:p和.login_button无法生效,我对P使用class、span都不能生效

<div class="entireInterface">
        <div class="logo">
            <img src="imgs/basshead.gif" >
        </div>
        <div class="loginInterface">
            <form class="loginForm">
                <div class="inputEmail">
                    <p>Email</p>
                    <input type="text" name="email" placeholder="email"></input>
                </div>
                <div class="inputPassword">
                    <p>Password</p>
                    <input type="password" name="password" placeholder="password" ></input>
                </div>
                <div class="login_button">
                    <input type="submit" value= "login"></input>
                </div>
            </form>
        </div>
    </div>
*{
    margin: 0;
    padding: 0;
}
body{
    margin: 1em 10%;
    background-color: #ddd;

}

form{
    background-color: #fb5;
}
.entireInterface{
    text-align: center;

}
img{
    width: 3em;
    height: 3em;
}
form{
    width: 10em;
    margin-left:auto;
    margin-right:auto;
    opacity:0.4;
    
p{
    margin-left: auto;
    font-size:0.1em; 
}
.login_button{
    background-color: blue;
}

展开
收起
杨冬芳 2016-06-12 09:41:59 2841 0
1 条回答
写回答
取消 提交回答
  • form样式的 定义没有闭合啊大哥。。。后面的大括号呢

    2019-07-17 19:33:13
    赞同 展开评论 打赏
问答分类:
问答地址:
问答排行榜
最热
最新

相关电子书

更多
零基础CSS入门教程 立即下载
低代码开发师(初级)实战教程 立即下载
阿里巴巴DevOps 最佳实践手册 立即下载