【问题标题】:Style.css does not changeStyle.css 没有改变
【发布时间】:2019-01-07 13:22:01
【问题描述】:

我的 style.css 有问题我正在尝试创建一个白框以隐藏文本但它没有更新,任何帮助都会有所帮助。

#advantages{
	text-align: center;
}
#advantages .box {
	background: #ffffff;
	margin: 0 0 30px;
	border: solid 1px #e6e6e6;
	box-sizing: border-box;
	padding: 20px;
	box-shadow: 0px 2px 5px rgba(0, 0, 0, .3);
}
<div class="advantages"><!-- advantages Begin -->
		<div class="container"><!-- container Begin -->
			<div class="same-height-row"><!-- same-height-row Begin -->
				<div class="col-sm-4"><!-- col-sm-4 Begin -->
					<div class="box same-height"><!-- box same-height Begin -->
						<div class="icon"><!-- icon Begin -->
							<i class="fa fa-heart"></i>
						</div><!-- icon Finished -->
						 <h3><a href="#">We Love Our Products</a></h3>
						 <p>We know to provide the best posible product ever</p>
					</div><!-- box same-height Finished -->
				</div><!-- col-sm-4 Finished -->
				<div class="col-sm-4"><!-- col-sm-4 Begin -->
					<div class="box same-height"><!-- box same-height Begin -->
						<div class="icon"><!-- icon Begin -->
							<i class="fa fa-tag"></i>
						</div><!-- icon Finished -->
						 <h3><a href="#">Best Prices</a></h3>
						 <p>Compare us with another site, who have the best prices.</p>
					</div><!-- box same-height Finished -->
				</div><!-- col-sm-4 Finished -->
				<div class="col-sm-4"><!-- col-sm-4 Begin -->
					<div class="box same-height"><!-- box same-height Begin -->
						<div class="icon"><!-- icon Begin -->
							<i class="fa fa-thumbs-up"></i>
						</div><!-- icon Finished -->
						 <h3><a href="#">100% Original Products</a></h3>
						 <p>We just offer you the best and original products.</p>
					</div><!-- box same-height Finished -->
				</div><!-- col-sm-4 Finished -->
				
			</div><!-- same-height-row Finished -->
		</div><!-- container Finished -->
	</div><!-- advantages Finished -->

我希望它们是一个白框,隐藏文本,但没有任何变化

【问题讨论】:

    标签: html web styles


    【解决方案1】:

    Advantages 是一个类,所以我们使用 '.'类和 '#' 为 id, 所以替换

        #advantages
    

       .advantages
    

    【讨论】:

    • 谢谢,我的优势犯了一个错误,我把 class 而不是 id 我改成了 id 并且一切正常,谢谢你的帮助。
    • 如果我的回答对您有帮助,请投票给我...祝您玩得愉快!
    【解决方案2】:

       <style>
    .advantages{
    	text-align: center;
    }
    .advantages .box {
    	background: #fff;
    	margin: 0 0 30px;
    	border: solid 1px #e6e6e6;
    	box-sizing: border-box;
    	padding: 20px;
    	box-shadow: 0px 2px 5px rgba(0, 0, 0, .3);
    }
    
    </style>
    <div class="advantages"><!-- advantages Begin -->
    		<div class="container"><!-- container Begin -->
    			<div class="same-height-row"><!-- same-height-row Begin -->
    				<div class="col-sm-4"><!-- col-sm-4 Begin -->
    					<div class="box same-height"><!-- box same-height Begin -->
    						<div class="icon"><!-- icon Begin -->
    							<i class="fa fa-heart"></i>
    						</div><!-- icon Finished -->
    						 <h3><a href="#">We Love Our Products</a></h3>
    						 <p>We know to provide the best posible product ever</p>
    					</div><!-- box same-height Finished -->
    				</div><!-- col-sm-4 Finished -->
    				<div class="col-sm-4"><!-- col-sm-4 Begin -->
    					<div class="box same-height"><!-- box same-height Begin -->
    						<div class="icon"><!-- icon Begin -->
    							<i class="fa fa-tag"></i>
    						</div><!-- icon Finished -->
    						 <h3><a href="#">Best Prices</a></h3>
    						 <p>Compare us with another site, who have the best prices.</p>
    					</div><!-- box same-height Finished -->
    				</div><!-- col-sm-4 Finished -->
    				<div class="col-sm-4"><!-- col-sm-4 Begin -->
    					<div class="box same-height"><!-- box same-height Begin -->
    						<div class="icon"><!-- icon Begin -->
    							<i class="fa fa-thumbs-up"></i>
    						</div><!-- icon Finished -->
    						 <h3><a href="#">100% Original Products</a></h3>
    						 <p>We just offer you the best and original products.</p>
    					</div><!-- box same-height Finished -->
    				</div><!-- col-sm-4 Finished -->
    				
    			</div><!-- same-height-row Finished -->
    		</div><!-- container Finished -->
    	</div><!-- advantages Finished -->

    【讨论】:

    • 你能在你的答案中添加一个简短的描述吗?
    【解决方案3】:

    尝试以下 css....

    .advantages{
        text-align: center;
    }
    .advantages .box {
        background: #ffffff;
        margin: 0 0 30px;
        border: solid 1px #e6e6e6;
        box-sizing: border-box;
        padding: 20px;
        box-shadow: 0px 2px 5px rgba(0, 0, 0, .3);
    }
    

    【讨论】:

      猜你喜欢
      • 2014-08-21
      • 1970-01-01
      • 1970-01-01
      • 2017-06-19
      • 1970-01-01
      • 2019-03-12
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多