UNPKG

bn-rate

Version:

React Star Rate Component(Base on rc-rate)

73 lines (72 loc) 1.99 kB
@font-face { font-family: 'anticon'; src: url('//at.alicdn.com/t/font_1457169990_5499172.eot'); /* IE9*/ src: url('//at.alicdn.com/t/font_1457169990_5499172.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */ url('//at.alicdn.com/t/font_1457169990_5499172.woff') format('woff'), /* chrome、firefox */ url('//at.alicdn.com/t/font_1457169990_5499172.ttf') format('truetype'), /* chrome、firefox、opera、Safari, Android, iOS 4.2+*/ url('//at.alicdn.com/t/font_1457169990_5499172.svg#iconfont') format('svg'); /* iOS 4.1- */ } .rc-rate { margin: 0; padding: 0; list-style: none; font-size: 18px; display: inline-block; vertical-align: middle; font-family: 'anticon'; font-weight: normal; font-style: normal; -webkit-font-smoothing: antialiased; /* 解决safair和chrome被加粗 */ -webkit-text-stroke-width: 0.2px; /* 解决chrome锯齿 */ -webkit-tap-highlight-color: transparent; } .rc-rate-disabled .rc-rate-star:before, .rc-rate-disabled .rc-rate-star-content:before { cursor: default; } .rc-rate-disabled .rc-rate-star:hover { -webkit-transform: scale(1); transform: scale(1); } .rc-rate-star { margin: 0; padding: 0; display: inline-block; margin-right: 8px; position: relative; -webkit-transition: all 0.3s ease; transition: all 0.3s ease; } .rc-rate-star:before, .rc-rate-star-content:before { color: #e9e9e9; cursor: pointer; content: "\E694"; -webkit-transition: all 0.3s ease; transition: all 0.3s ease; } .rc-rate-star:hover { -webkit-transform: scale(1.1); transform: scale(1.1); } .rc-rate-star-content { position: absolute; left: 0; top: 0; width: 50%; height: 100%; overflow: hidden; display: none; } .rc-rate-star-half .rc-rate-star-content { display: block; } .rc-rate-star-half .rc-rate-star-content:before, .rc-rate-star-full:before { color: #f5a623; } .rc-rate-star-half:hover .rc-rate-star-content:before, .rc-rate-star-full:hover:before { color: #f8c165; }