如题所述
1、直接使用行内样式,即在html标签上使用style
2、先定义css样式,再给html的class属性赋值
总结:两种方式效果是一致的,只是第二种方式可进行重用,只要html元素class属性相同即可