1.内嵌样式
<div style={{color:"#ccc"}}>item</div>
2.选择器样式
<h3 className="title">Search Github Users</h3>
3.三目表达式
<span className={true ? 'span' : '' }>样式</span>
4.样式模块化
第一步:css文件名称以:'名称.module.css'命名
第二步:在页面中导入使用,自定义模块化命名
比如:写的是头部的样式:import header from "./index.module.css"
第三步:使用时必须时---》模块化名称.选择器名称
<h3 className={header.title}>样式</h3>