diff --git a/SinkDark/publicStatic/css/base.css b/SinkDark/publicStatic/css/base.css index f7d8f8f..f9957a3 100644 --- a/SinkDark/publicStatic/css/base.css +++ b/SinkDark/publicStatic/css/base.css @@ -7,6 +7,7 @@ body { line-height: 1.5; /* 设置行高为字体大小的1.5倍 */ background-size: cover; /* 背景图片覆盖整个元素区域,可能会被裁剪以保持宽高比 */ background-repeat: no-repeat; /* 背景图片不重复 */ + background-attachment: fixed; /* 背景图片固定,不随页面滚动 */ } img { border: 0; display: block } ul, li { list-style: none; } @@ -17,7 +18,30 @@ a:hover { text-decoration: none; color: #000; } .f_l { float: left } .f_r { float: right } article { width: 1000px; margin: 80px auto 0; overflow: hidden; zoom: 1; } -aside { width: 30%; float: left; overflow: hidden; display: block; position: relative; z-index: 1 } +.l_box { + /* 左边栏CSS样式规则 */ + float: left; /* 举例:让这个aside元素向左浮动 */ + width: 20%; /* 举例:设置宽度为父容器的25% */ + margin-right: 20px; /* 举例:设置右边距为20px */ + background-color: #f0f0f0; /* 举例:设置背景颜色为浅灰色 */ + /* 您可以添加更多的样式规则 */ + overflow: hidden; + display: block; + position: relative; + z-index: 1 +} +.r_box { + /* 右边栏CSS样式规则 */ + float: right; /* 举例:让这个aside元素向右浮动 */ + width: 20%; /* 举例:设置宽度为父容器的20% */ + margin-left: 20px; /* 举例:设置右边距为20px */ + background-color: #f0f0f0; /* 举例:设置背景颜色为浅灰色 */ + /* 您可以添加更多的样式规则 */ + overflow: hidden; + display: block; + position: relative; + z-index: 1 +} main { overflow: hidden; width: 68%; float: right; display: block; } .container { width: 1000px; margin: auto } nav { width: 1000px; margin: auto } diff --git a/SinkDark/publicStatic/css/index.css b/SinkDark/publicStatic/css/index.css index b822f39..e02cdd1 100644 --- a/SinkDark/publicStatic/css/index.css +++ b/SinkDark/publicStatic/css/index.css @@ -1,4 +1,4 @@ - @charset "gb2312"; + @charset "UTF-8"; .l_box h2 { color: #333; font-size: 14px; line-height: 30px; padding-left: 20px; background: #fff } .l_box div { background: rgba(255,255,255,0.5); margin-bottom: 20px; overflow: hidden } .l_box div ul { padding: 10px; overflow: hidden } diff --git a/SinkDark/static/css/base.css b/SinkDark/static/css/base.css index f7d8f8f..c51ba3a 100644 --- a/SinkDark/static/css/base.css +++ b/SinkDark/static/css/base.css @@ -18,6 +18,7 @@ a:hover { text-decoration: none; color: #000; } .f_r { float: right } article { width: 1000px; margin: 80px auto 0; overflow: hidden; zoom: 1; } aside { width: 30%; float: left; overflow: hidden; display: block; position: relative; z-index: 1 } + main { overflow: hidden; width: 68%; float: right; display: block; } .container { width: 1000px; margin: auto } nav { width: 1000px; margin: auto } diff --git a/SinkDark/static/images/盐湖.png b/SinkDark/static/images/盐湖.png new file mode 100644 index 0000000..b26855d Binary files /dev/null and b/SinkDark/static/images/盐湖.png differ diff --git a/SinkDark/templates/base.html b/SinkDark/templates/base.html index 01d88b9..999e21e 100644 --- a/SinkDark/templates/base.html +++ b/SinkDark/templates/base.html @@ -17,11 +17,11 @@ @@ -66,8 +66,8 @@