CSS Tips: 3 Features that you should know

CSS Tips: 3 Features that you should know

1) is function

If you have to target multiple elements from multiple targets like this:

No alt text provided for this image

You can use the is function to clean the selectors.

No alt text provided for this image

2) text-overflow property

Let's say that you want to display only the first line of a text and if there is more, it should add "..." at the end. Like this:

No alt text provided for this image

You can easily do this is CSS with text-overflow.

No alt text provided for this image

3) background-clip property

If you want a text to look fancier, to have a color texture.

No alt text provided for this image

You can do this using background-clip and background-image.

No alt text provided for this image


Tell me what do you think about these features. :)

Leave a like if you find this useful, so others like you can benefit from it.

Thanks for reading my article!

You can also find my articles on my website:?mariusatasiei.com/blog

Cristian Morosanu

UI/UX Designer | Web Designer & Developer

9 个月

Background-clip is top

要查看或添加评论,请登录

Marius Atasiei的更多文章

  • Boost Your Flutter App's Speed with Dart?Isolates

    Boost Your Flutter App's Speed with Dart?Isolates

    Imagine building a super-fast Flutter app that never leaves your users waiting. That’s where Dart isolates come in!…

  • Effortless App Development: Flutter and Riverpod in Action

    Effortless App Development: Flutter and Riverpod in Action

    Flutter, Google’s UI toolkit, has revolutionized how developers build beautiful, cross-platform apps. When paired with…

  • SOLID Principles using Dart

    SOLID Principles using Dart

    In the world of software development, crafting maintainable, scalable, and adaptable code is crucial. SOLID principles…

  • Clean React: Better Imports

    Clean React: Better Imports

    JavaScript may be the worst programming language when it comes to import. And we all hate those 20 lines of imports we…

    2 条评论
  • Fast JavaScript: Dynamic imports

    Fast JavaScript: Dynamic imports

    For having a clean code in JavaScript, you must use multiple modules which are imported from one to another. But some…

    7 条评论
  • 8 VSCODE EXTENSIONS THAT EVERY WEB DEVELOPER HAVE TO USE

    8 VSCODE EXTENSIONS THAT EVERY WEB DEVELOPER HAVE TO USE

    One of the best features that IDEs have, is the extensions. The extensions help you to be as efficient as possible and…

    5 条评论
  • 5 HTML Tips for Better Websites

    5 HTML Tips for Better Websites

    React, Angular, Vue. Indifferent what framework do you use, as a frontend developer, you have to deal with HTML.

  • Advanced TypeScript Methods

    Advanced TypeScript Methods

    Restrict types of parameter dynamically 1. Create type Row and Col 2.

  • GIVE TYPESCRIPT A CHANCE

    GIVE TYPESCRIPT A CHANCE

    TypeScript is a "programming language" which offers you all JavaScript benefits and some more addons. A few things that…

社区洞察

其他会员也浏览了