css布局实现硬件资源使用率widget卡片排列效果代码
代码语言:html
所属分类:布局界面
代码描述:css布局实现硬件资源使用率widget卡片排列效果代码
代码标签: css 布局 硬件 资源 使用率 widget 卡片 排列
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="zh-CN"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <style> :root { --primary-color: #4361ee; --secondary-color: #3f37c9; --success-color: #4cc9f0; --warning-color: #f8961e; --danger-color: #f94144; --dark-color: #212529; --light-color: #f8f9fa; --gray-color: #6c757d; --border-radius: 12px; --box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08); --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1); } * { margin: 0; padding: 0; box-sizing: border-box; } body { font-family: 'Roboto', 'PingFang SC', 'Microsoft YaHei', sans-serif; background: linear-gradient(135deg, #f5f7fa 0%, #e4e8f0 100%); color: var(--dark-color); min-height: 100vh; padding: 40px 20px; line-height: 1.6; } .container { max-width: 1200px; margin: 0 auto; } .dashboard-header { text-align: center; margin-bottom: 40px; position: relative; } .dashboard-title { font-size: 2.5rem; font-weight: 700; color: var(--primary-color); margin-bottom: 10px; position: relative; display: inline-block; } .dashboard-title::after { content: ''; position: absolute; bottom: -8px; left: 50%; transform: translateX(-50%); width: 80px; height: 4px; background: linear-gradient(90deg, var(--primary-color), var(--success-color)); border-radius: 2px; } .dashboard-subtitle { font-size: 1rem; color: var(--gray-color); font-weight: 400; max-width: 600px; margin: 0 auto; } .legend { display: flex; justify-content: center; margin: 30px 0; flex-wrap: wrap; gap: 15px; } .legend-item { display: flex; align-items: center; background: white; padding: 8px 15px; border-radius: 20px; box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05); transition: var(--transition); } .legend-item:hover { transform: translateY(-2px); box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1); } .legend-color { width: 16px; height: 16px; border-radius: 50%; margin-right: 8px; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); } .grid-container { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 25px; margin-bottom: 40px; } .grid-item { background: white; border-radius: var(--border-radius); box-shadow: var(--box-shadow); padding: 20px; transition: var(--transition); position: relative; overflow: hidden; border: 1px solid rgba(255, 255, 255, 0.2); } .grid-item::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 5px; background: linear-gradient(90deg, var(--primary-color), var(--success-color)); } .grid-item:hover { transform: translateY(-8px); .........完整代码请登录后点击上方下载按钮下载查看
网友评论0