react标签动态控制显示样式和class
作者:互联网
<div style={{ display: 'block' }}></div> <div style={{ display: true?'block':'none' }}></div> <div style={{ display: true?'block':'none', color: aaaaa, background: 'red' }}></div>
<div className="example1 example2"></div> <div className={true?'example1':''}></div> <div className={`${true?'example1':''} ${true?'example2':''} example3`}></div>
标签:显示,样式,标签,react,动态控制,class 来源: https://www.cnblogs.com/XUYIYUAN/p/13955414.html