- child::组件内样式
#review/前端/基础/React
In React, you specify a CSS class with
className
. It works the same way as the HTMLclass
attribute:
<img className="avatar" />
Then you write the CSS rules for it in a separate CSS file:
/* In your CSS */
.avatar { border-radius: 50%;}