js实现颜色卡片排列点击选择色值效果代码
代码语言:html
所属分类:其他
代码描述:js实现颜色卡片排列点击选择色值效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en" > <head> <meta charset="UTF-8"> <style> @import url('https://fonts.googleapis.com/css?family=Nunito:400,700&display=swap'); * { margin: 0; padding: 0; box-sizing: border-box; transition: all .3s; } body { background-color: #e8ecf3; font-family: 'Nunito', sans-serif; display: flex; align-items: center; justify-content: center; height: 100vh; margin: 0; } .container { width: 900px; max-width: 900px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; margin: 10px; } .container h4 { position: fixed; top: 30px; font-size: 14px; background-color: #111a36; color: #e8ecf3; font-weight: 400; padding: 12px 30px; border-radius: 30px; box-shadow: 0 6px 10px #111a3630; transform: scale(0); z-index: 999; } h4 strong { text-transform: uppercase; } .container h2 { font-size: 26px; } .container .palettes { display: flex; flex-wrap: wrap; gap: 20px; align-items: center; justify-content: center; padding: 60px 0; } .palettes .palette { position: relative; background-color: #fff; padding: 8px; padding-bottom: 12px; border-radius: 12px; text-align: center; cursor: pointer; } .palette .color { width: 140px; height: 190px; .........完整代码请登录后点击上方下载按钮下载查看
网友评论0