hexToRgba(hex, ...opacity) {let rgbaArry = []opacity.forEach(item => {rgbaArry.push(`rgba(${parseInt('0x'+hex.slice(1, 3))},${parseInt('0x'+hex.slice(3, 5))},${parseInt('0x'+hex.slice(5, 7))},${item})`)})return rgbaArry}
1200字范文,内容丰富有趣,写作的好帮手!
时间:2018-08-08 06:02:19
hexToRgba(hex, ...opacity) {let rgbaArry = []opacity.forEach(item => {rgbaArry.push(`rgba(${parseInt('0x'+hex.slice(1, 3))},${parseInt('0x'+hex.slice(3, 5))},${parseInt('0x'+hex.slice(5, 7))},${item})`)})return rgbaArry}