Jump to content

:after :before não estão a aparecer


RuiAlmeida20
 Share

Recommended Posts

Boas, gostava de saber qual o erro que tenho para impedir o after e o before de aparecere, código;

<ul class="socialicons socialicons-left">
		<li class="fa-stack fa-fw">
			<a href="" data-toggle="tooltip" data-placement="top" data-original-title="Follow on twitter">
				<i class="fa fa-stop fa-stack-2x"></i>
				<i class="fa fa-twitter fa-stack-1x"></i>
			</a>
		</li>
		<li class="fa-stack fa-fw">
			<a href="" data-toggle="tooltip" data-placement="top" data-original-title="Like on facebook">
				<i class="fa fa-stop fa-stack-2x"></i>
				<i class="fa fa-facebook fa-stack-1x"></i>
			</a>
		</li>
		<li class="fa-stack fa-fw">
			<a href="" data-toggle="tooltip" data-placement="top" data-original-title="Follow on instagram">
				<i class="fa fa-stop fa-stack-2x"></i>
				<i class="fa fa-instagram fa-stack-1x"></i>
			</a>
		</li>
		<li class="fa-stack fa-fw">
			<a href="" data-toggle="tooltip" data-placement="top" data-original-title="Subscribe on youtube">
				<i class="fa fa-stop fa-stack-2x"></i>
				<i class="fa fa-youtube fa-stack-1x"></i>
			</a>
		</li>
	</ul>

.socialicons {
min-width: 200px;
min-height: 50px;
margin: 0 auto;
top: 155px;
left: 580px;
position: absolute;
}
.socialicons-left {
min-width: 50px;
max-width:50px;
min-height: 200px;
max-height:200px;
margin: 0 auto;
top: 500px;
z-index:1010000;
left: 0;
position: absolute;
background:#32688f;
}
.socialicons:before {
clear:both;
  width: 0;
height: 0;
border-style: solid;
border-width: 50px 0 0 50px;
border-color: transparent transparent transparent #007bff;
}
.socialicons:after {
width: 0;
height: 0;
border-style: solid;
border-width: 50px 50px 0 0;
border-color: #007bff transparent transparent transparent;
}
.socialicons li {
	width: 45px;
height: 45px;
line-height: 45px;
}
.socialicons li .fa-stack-2x {
font-size: 45px;
}
.socialicons li i {
font-size:30px;
}
.fa-youtube {
color:#cd201f;
}
.fa-instagram {
color:#3f729b;
}
.fa-facebook {
color:#3b5998;
}
.fa-twitter {
color:#55acee;
}
.socialicons a, .socialicons a:hover {
color:#fff;
cursor:pointer;
}

Obrigado.

Link to comment
Share on other sites

::after serve para adicionar um elemento após o outro. :: before serve para adicionar um elemento após o outro

Os elementos que você coloca tem tamanho zero.

.socialicons::before {
 clear:both;
width: 0;
 height: 0;

Define ai algum tamanho para ver se não é esse o problema.

Vou deixar aqui um exemplo básico para você

<style>
div::before {
content: "antes ";
color:blue;
}
div::after {
content: " após";
color:green;
}
</style>

<div>texto</div>
Edited by apocsantos
geshi
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

By using this site you accept our Terms of Use and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.