background preloader

Cours

Facebook Twitter

CSS Content. CSS has a property called content. It can only be used with the pseudo elements :after and :before. It is written like a pseudo selector (with the colon), but it's called a pseudo element because it's not actually selecting anything that exists on the page but adding something new to the page. This is what it looks like: With this CSS in place, we could have this HTML: <ul><li class="email-address">chriscoyier@gmail.com</li></ul> And the output would be like: • Email address: chriscoyier@gmail.com Maybe that example doesn't get you drooling, but pseduo element content can be quite useful and do cool things.

Hey! The first concern might be that of a separation-between-content-and-design purist. I think it's awesome and perfectly suited for CSS. I'm going to publish an article tomorrow with this kind of idea. Using Special Characters If you need to use a special character in the CSS content, it's kinda weird. Here's some random useful ones: Example Trick: Checkmark visited links Using Attributes. 22 Advanced CSS Text Effects And Web Typography Tips. Chrome.

Vous devez être connecté à Google+ pour effectuer cette opération. Le site Google pour les développeurs a besoin de votre autorisation pour effectuer cette opération. Developer Network. Tuts+ Code Tutorials. Learn Web Design, Web Development, and More | Treehouse.