css实现减色和加色对比效果代码
代码语言:html
所属分类:布局界面
代码描述:css实现减色和加色对比效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en" > <head> <meta charset="UTF-8"> <style> .wrapper { display: flex; flex-direction: column; } @media (min-width: 1200px) { .wrapper { flex-direction: row; flex-wrap: nowrap; min-height: calc(100vh - 58px); } } .colorsContainer { position: relative; width: 100%; aspect-ratio: 1/1; } .materialsColors { background: #eee; color: #111; } .materialsColors .colorBox { mix-blend-mode: multiply; } .lightsColors { background: #111; color: #eee; } .lightsColors .colorBox { mix-blend-mode: screen; } .colorBox { position: absolute; top: 50%; left: 50%; width: 40%; aspect-ratio: 1/1; margin: -20%; border-radius: 50%; } .colorBox:nth-child(0n+1) { transform: rotate(0deg) translateY(-45%) rotate(0deg); } .lightsColors .colorBox:nth-child(0n+1) { background-color: #330000; } .materialsColors .colorBox:nth-child(0n+1) { background-color: #ffcccc; } .colorBox:nth-child(1n+2) { transform: rotate(9deg) translateY(-45%) rotate(-9deg); } .lightsColors .colorBox:nth-child(1n+2) { background-color: #330800; } .materialsColors .colorBox:nth-child(1n+2) { background-color: #ffd4cc; } .colorBox:nth-child(2n+3) { transform: rotate(18deg) translateY(-45%) rotate(-18deg); } .lightsColors .colorBox:nth-child(2n+3) { background-color: #330f00; } .materialsColors .colorBox:nth-child(2n+3) { background-color: #ffdbcc; } .colorBox:nth-child(3n+4) { transform: rotate(27deg) translateY(-45%) rotate(-27deg); } .lightsColors .colorBox:nth-child(3n+4) { background-color: #331700; } .materialsColors .colorBox:nth-child(3n+4) { background-color: #ffe3cc; } .colorBox:nth-child(4n+5) { transform: rotate(36deg) translateY(-45%) rotate(-36deg); } .lightsColors .colorBox:nth-child(4n+5) { background-color: #331f00; } .materialsColors .colorBox:nth-child(4n+5) { background-color: #ffebcc; } .colorBox:nth-child(5n+6) { transform: rotate(45deg) translateY(-45%) rotate(-45deg); } .lightsColors .colorBox:nth-child(5n+6) { background-color: #332.........完整代码请登录后点击上方下载按钮下载查看
网友评论0