From 32842b046f365e9efe906aa9b30828ce572d4eb5 Mon Sep 17 00:00:00 2001 From: Chen Yang Date: Fri, 20 Jun 2025 09:29:51 +0800 Subject: [PATCH] Reformat the css code. --- style.css | 191 +++++++++++++++++++++++++++++------------------------- 1 file changed, 104 insertions(+), 87 deletions(-) diff --git a/style.css b/style.css index bf4d387..e1de3bb 100755 --- a/style.css +++ b/style.css @@ -1,118 +1,123 @@ html { - scroll-behavior: smooth; - max-width: 800px; - margin: auto; + scroll-behavior: smooth; + max-width: 800px; + margin: auto; } body { - font-family: "Palatino", "Georgia", Times, serif; - background-color: rgb(255, 255, 250); - line-height: 1.4; - padding-bottom: 200px; + font-family: "Palatino", "Georgia", Times, serif; + background-color: rgb(255, 255, 250); + line-height: 1.4; + padding-bottom: 200px; } img { border-radius: 15px; } -h1, h2, h3, h4 { - padding-top: 0px; - padding-bottom: 10px; - text-align: center; +h1, +h2, +h3, +h4 { + padding-top: 0px; + padding-bottom: 10px; + text-align: center; } -th{ - font-weight: normal; +th { + font-weight: normal; } p { padding-bottom: 10px; } -#topbar{ +#topbar { display: inline-block; padding: 0 5px; } div#annoucement { - width: 750px; + width: 750px; } table#table1 { - text-align:left; - margin-left:35; - margin-right:auto; + text-align: left; + margin-left: 35; + margin-right: auto; } ul#course { - list-style: none; - padding-left: 5; + list-style: none; + padding-left: 5; } /* The navigation bar */ .navbar { - opacity: 0.8; - overflow: hidden; - background-color: #333; - position: fixed; /* Set the navbar to fixed position */ - top: 0; /* Position the navbar at the top of the page */ - left: 0; - width: 100%; /* Full width */ - text-align: center; - font-weight: bold; + opacity: 0.8; + overflow: hidden; + background-color: #333; + position: fixed; + /* Set the navbar to fixed position */ + top: 0; + /* Position the navbar at the top of the page */ + left: 0; + width: 100%; + /* Full width */ + text-align: center; + font-weight: bold; } /* Links inside the navbar */ .navbar a { - /* float: left; */ - display: inline-block; - color: #f2f2f2; - text-align: center; - padding: 10px 16px; - text-decoration: none; + /* float: left; */ + display: inline-block; + color: #f2f2f2; + text-align: center; + padding: 10px 16px; + text-decoration: none; } /* Change background on mouse-over */ .navbar a:hover { - background: #ddd; - color: black; + background: #ddd; + color: black; } /* Main content */ .main { - margin-top: 5px; /* Add a top margin to avoid content overlay */ + margin-top: 5px; + /* Add a top margin to avoid content overlay */ } hr { - border-top: dashed 1px; + border-top: dashed 1px; } .notATable { - display:table; - list-style:none; - padding-left:5; + display: table; + list-style: none; + padding-left: 5; /* font-size:16px; */ } -.notATable > li -{ - display:table-row; +.notATable>li { + display: table-row; } - -.notATable > li > * -{ - display:table-cell; - padding:2px; + +.notATable>li>* { + display: table-cell; + padding: 2px; } - - + + .notATable label { - font-weight:bold; - text-align:right; + font-weight: bold; + text-align: right; } - + .notATable label:after { - content: '|'; + content: '|'; } #shadowbox { @@ -123,46 +128,46 @@ hr { } hr.style-one { -border: 0; -height: 1px; -background: #333; -background-image: -webkit-linear-gradient(left, #ccc, #333, #ccc); -background-image: -moz-linear-gradient(left, #ccc, #333, #ccc); -background-image: -ms-linear-gradient(left, #ccc, #333, #ccc); -background-image: -o-linear-gradient(left, #ccc, #333, #ccc); + border: 0; + height: 1px; + background: #333; + background-image: -webkit-linear-gradient(left, #ccc, #333, #ccc); + background-image: -moz-linear-gradient(left, #ccc, #333, #ccc); + background-image: -ms-linear-gradient(left, #ccc, #333, #ccc); + background-image: -o-linear-gradient(left, #ccc, #333, #ccc); } hr.style-zero { -border: 0; -height: 0px; -background: #333; -background-image: -webkit-linear-gradient(left, #ccc, #333, #ccc); -background-image: -moz-linear-gradient(left, #ccc, #333, #ccc); -background-image: -ms-linear-gradient(left, #ccc, #333, #ccc); -background-image: -o-linear-gradient(left, #ccc, #333, #ccc); + border: 0; + height: 0px; + background: #333; + background-image: -webkit-linear-gradient(left, #ccc, #333, #ccc); + background-image: -moz-linear-gradient(left, #ccc, #333, #ccc); + background-image: -ms-linear-gradient(left, #ccc, #333, #ccc); + background-image: -o-linear-gradient(left, #ccc, #333, #ccc); } hr.curve { -border: 0; -height: 15px; -background-image: url(curve.png); -background-size: 100% 100%; -background-repeat: no-repeat; + border: 0; + height: 15px; + background-image: url(curve.png); + background-size: 100% 100%; + background-repeat: no-repeat; } .box { - width:100%; - height:280px; - background:rgb(220, 220, 220); - margin:40px auto; + width: 100%; + height: 280px; + background: rgb(220, 220, 220); + margin: 40px auto; } -.effect2 -{ +.effect2 { position: relative; } -.effect2:before, .effect2:after -{ + +.effect2:before, +.effect2:after { z-index: -1; position: absolute; content: ""; @@ -170,7 +175,7 @@ background-repeat: no-repeat; left: 10px; width: 50%; top: 80%; - max-width:300px; + max-width: 300px; background: #777; -webkit-box-shadow: 0 15px 10px #777; -moz-box-shadow: 0 15px 10px #777; @@ -181,8 +186,8 @@ background-repeat: no-repeat; -ms-transform: rotate(-3deg); transform: rotate(-3deg); } -.effect2:after -{ + +.effect2:after { -webkit-transform: rotate(3deg); -moz-transform: rotate(3deg); -o-transform: rotate(3deg); @@ -272,9 +277,11 @@ background-repeat: no-repeat; 0% { -webkit-transform: translate(-15px); } + 50% { -webkit-transform: translate(15px); } + 100% { -webkit-transform: translate(-15px); } @@ -284,9 +291,11 @@ background-repeat: no-repeat; 0% { -webkit-transform: translate(15px); } + 50% { -webkit-transform: translate(-15px); } + 100% { -webkit-transform: translate(15px); } @@ -296,9 +305,11 @@ background-repeat: no-repeat; 0% { -moz-transform: translate(-15px); } + 50% { -moz-transform: translate(15px); } + 100% { -moz-transform: translate(-15px); } @@ -308,9 +319,11 @@ background-repeat: no-repeat; 0% { -moz-transform: translate(15px); } + 50% { -moz-transform: translate(-15px); } + 100% { -moz-transform: translate(15px); } @@ -320,9 +333,11 @@ background-repeat: no-repeat; 0% { transform: translate(-15px); } + 50% { transform: translate(15px); } + 100% { transform: translate(-15px); } @@ -332,10 +347,12 @@ background-repeat: no-repeat; 0% { transform: translate(15px); } + 50% { transform: translate(-15px); } + 100% { transform: translate(15px); } -} +} \ No newline at end of file