css实现传统上下拨杆电灯开关切换效果代码
代码语言:html
所属分类:其他
代码描述:css实现传统上下拨杆电灯开关切换效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en" > <head> <meta charset="UTF-8"> <style> /* COLORS */ body { display: grid; place-content: center; min-height: 100vh; font-family: sans-serif; overflow: clip; background-color: #50a2a7; } body .container { height: 100vh; width: 100vw; display: grid; place-items: center; align-content: center; } body .container h1 { opacity: 0; color: #e9b44c; } body .container svg path.switch { transform-origin: center; } body .container svg.switch-off path.switch { transform: rotatex(180deg); fill: #f2f7f2; } .lightsoff { background-color: #1c110a; } .lightsoff .container h1 { opacity: 1; } </style> .........完整代码请登录后点击上方下载按钮下载查看
网友评论0