Normally you would do this with the : first - letter pseudo-element, but seeing as you have : before content, which inserts text before the actual content of your paragraph, then rather than the first letter of the actual content, : first - letter would match the first letter of the : before content instead. CSS : before and : first -child combined 2 vastausta 27. CSS pseudo-element to apply the first character of. Lisää tuloksia kohteesta stackoverflow.
Välimuistissa Samankaltaisia Käännä tämä sivu Definition and Usage. Note: The following properties can be used with .
CSS property that selects the first letter of the element where it is applied and specifies the number of lines the letter occupies. Initially pseudo-elements were . Recommended Reading: Understanding Pseudo-Element : Before And : . Pseudo-elements in CSS will give you more styling options. This simply adds the strings before the selected elements, in this case,.
It is, however, important to realize that the first letter of an element can be tricky to spot. Get browser support information for the first-line and first - letter pseudo elements in the. CSS introduced two new pseudo element selectors, before and after.