CSS Class Selector Example: How to Target Elements with a Specific Class
The correct example of a class selector is:
C. h2.type1 {color: #000000;}
Explanation:
- Class selectors use a dot (.) followed by the class name. In this case, the class name is 'type1'.
- The code targets all
h2elements that have the class 'type1' and sets their color to black (#000000).
原文地址: https://www.cveoy.top/t/topic/pk05 著作权归作者所有。请勿转载和采集!