运行 ❯
获取您
自己
的网站
×
更改方向
保存代码
更改主题,深色/浅色
前往 Spaces
<!DOCTYPE html> <html> <head> <style> #p1 {background-color:#ff0000;} #p1a {background-color:#ff000080;} #p2 {background-color:#00ff00;} #p2a {background-color:#00ff0080;} #p3 {background-color:#0000ff;} #p3a {background-color:#0000ff80;} #p4 {background-color:#ffff00;} #p4a {background-color:#ffff0080;} #p5 {background-color:#ff00ff;} #p5a {background-color:#ff00ff80;} </style> </head> <body> <h2>HEX colors with transparency</h2> <p>A hexadecimal color is specified with: #RRGGBB. To add transparency, add two additional digits between 00 and FF.</p> <p id="p1">Red</p> <p id="p1a">Red transparency</p> <p id="p2">Green</p> <p id="p2a">Green transparency</p> <p id="p3">Blue</p> <p id="p3a">Blue transparency</p> <p id="p4">Yellow</p> <p id="p4a">Yellow transparency</p> <p id="p5">Cerise</p> <p id="p5a">Cerise transparency</p> </body> </html>