ابدأ بالتواصل مع الأشخاص وتبادل معارفك المهنية

أنشئ حسابًا أو سجّل الدخول للانضمام إلى مجتمعك المهني.

متابعة

Why we use Pseudo-elements in CSS?

user-image
تم إضافة السؤال من قبل Shahid Aziz , Web Developer , Niche-vision
تاريخ النشر: 2014/05/07
Muhammad Waqas
من قبل Muhammad Waqas , C#/.Net Developer , Signup solution

Apart from the multiple instances of the same html element if you want to apply some effect on portion of an element(first letter etc) or on some selectors you use pseudo-elements

Feysal Mama
من قبل Feysal Mama , Software Developer , Minister of science and higher Education - Ethiopia

pseudo-element in CSS is a keyword added to a selector that lets we style a specific part of the selected element(s).

Toha Yaseen
من قبل Toha Yaseen , Executive , The Jammu And Kashmir Bank Ltd

CSS pseudo-elements are used to add special effects to some selectors.

for example

p::first-line {color:#ff0000;font-variant:small-caps;}

this will add effect to only first line of the <p>

المزيد من الأسئلة المماثلة

هل تحتاج لمساعدة في كتابة سيرة ذاتية تحتوي على الكلمات الدلالية التي يبحث عنها أصحاب العمل؟