在div结束之后添加之前

时间:2015-09-04 06:32:12

标签: html css

我想在div结束后添加一个分隔符。我想我们可以使用它,就像我们可以用于导航菜单和li之后或li之前。

我可以在我的案例中添加这样的内容吗?

here's我在尝试什么。

this.FormClosing += new FormClosingEventHandler(Form1_FormClosing);

这会有用吗?

请建议添加分隔符的方法如果不是这样的话。

4 个答案:

答案 0 :(得分:2)

实际上,您的$('#play').click(function(){ $('#header_1').transition({ animation : 'fade', duration : '500ms', onComplete : function(){ $('#hidden').transition({'show'}); } }); 标记包含p类(.step1description下没有p元素),因此正确的声明应为:

.step1description

示例:https://jsfiddle.net/w4rmmvkc/2/

答案 1 :(得分:2)

我无法确切地询问您的问题,但我认为您在css课程中使用此代码,您的代码正在运行。

的CSS

.center-logo p.step1description::before {}

答案 2 :(得分:0)

我认为这可以帮到你

.content-wrapper {

	position: relative;
	overflow: hidden; 
	width: 100%;
	background-color: #333230; 
}

.content-wrapper .center-logo {

	position: relative; width: 100%;
	text-align: center;
	margin: 30px 0 15px 0;
}


.content-wrapper .center-logo img {

	display: inline-block; 
}

.content-wrapper .step1description{

	position: relative;
	color: #fff;
	bottom: 24px;
	font-size: 10px;
}

	.content-wrapper .step1description:after {

		content: '';
		position: absolute; 
		width: 100%;
		height:  3px; 
		display: inline-block;
		background-position: center;
		background-image: url(http://i.imgur.com/Wrk0SFT.png);  
       width:100%;
      bottom:0px;
      left:0;
      top:30px;
     
	}
<div class="content-wrapper">

                <div class="container">
                    
                    <div class="row">

                        <div class="col-xs-12">

                            <div class="center-logo">

                                <img src="assets/description.png" alt="">
                                <P class = "step1description"> This is Testing </p>
                                        
                            </div>
                        
                        </div>  

                    </div>
                    
                </div>     

            </div>

答案 3 :(得分:0)

您可以在:before上使用.step1description(您的css试图引用任何.step1description的孩子

同时更改为position:relativedisplay:block。这样,线条将很好地放置在图像和p内的文本之间。

.content-wrapper .step1description:before {

    content: '';
    position: relative; 
    width: 100%;
    height:  5px; 
    display: block;
    background-position: center;
    background-image: url(http://i.imgur.com/Wrk0SFT.png); 
}