I am using bootstrap and fontawesome. I've got a bullet list like that:
<ul class="fa-ul lead">
<li class="m"><i class="fa-li fa fa-2x fa-check"></i><p>Text.</p></li>
<li class="m"><i class="fa-li fa fa-2x fa-check"></i><p>Text.</p></li>
<li class="m"><i class="fa-li fa fa-2x fa-check"></i><p>Text.</p></li>
<li class="m"><i class="fa-li fa fa-2x fa-check"></i><p>Text.</p></li>
</ul>
The icons fa
produced a bit too rich and vivid. I want to add a bit transparency or something to make them looking not so much vivid. Is there any way I can do that without any custom css
?
UPDATED:
By saying custom css
I meant that may be there is some bootstrap or fontawesome css classes already exists in order to do that. So I was looking for css solution.
You can simply set a single "color" property to set the color of the character/icon to be what you want. If the background circle offsets the icon, you can use line-height to fix it.
You can customize Font Awesome Icon fa Icon Fa as per your requirement, suppose that you need to chnage the color of Fa icon or change the size of size. It is pretty simple to change color of icon Fa just add style="color:red" it will make font color red.
Sure! It doesn't matter if it's a font icon or an SVG icon, you can still animate the element with CSS.
As stated on Font Awesome's homepage:
Font Awesome gives you scalable vector icons that can instantly be customized — size, color, drop shadow, and anything that can be done with the power of CSS.
There's absolutely no reason not to use CSS, so ignoring your requirement of not using CSS I'm going to give you a CSS solution anyway and suggest you use this instead of the non-CSS solution I've also provided:
Font Awesome icons are characters contained within a font. This makes them regular text, allowing you to style the characters as you would regular text.
.fa-li.fa.fa-2x.fa-check {
opacity: 0.75; /* Opacity (Transparency) */
color: rgba(0, 0, 0, 0.75); /* RGBA Color (Alternative Transparency) */
-webkit-filter: blur(2px); /* Blur */
-moz-filter: blur(2px);
filter: blur(2px);
}
A better solution might just be to change the colour of your icons to something less prominent:
.fa-li.fa.fa-2x.fa-check {
color: #444;
}
If you really want a non-CSS solution, like you've stated in the question, one thing you could do is save the relevant icon as an image and play around with it in any picture editing software to apply the effect you're looking for. Then, instead of adding the icon in using the provided Font Awesome CSS, you could upload the image to your server and include it as an img
element:
<img src="path/to/my-modified-fa-icon.png" alt="fa-check" />
how about
.fa{
opacity:0.5;
}
Thats assuming you want all fa icons a little 'see through' you could of course always change the colour too, so maybe use grey instead of black
.fa{
color:#878787;
}
If you only want to style this lists fa's try
.m .fa{
opacity:0.5;
}
or if you are using sass/less
.m{
.fa{
opacity:0.5;
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With