summaryrefslogtreecommitdiff
path: root/src/components/TrafficNow.module.scss
diff options
context:
space:
mode:
authorcubemaze <[email protected]>2023-05-10 15:25:47 +0800
committercubemaze <[email protected]>2023-05-11 09:37:45 +0800
commitbbc9aac92a582ba7a19b06bb98f975ba5eb90713 (patch)
treebca1ffed6347ad6a26f834c40098a78dd251edd3 /src/components/TrafficNow.module.scss
parentc901c585b044d956f8905998e78bcdb09ab7a68c (diff)
chore: homepage style
Diffstat (limited to 'src/components/TrafficNow.module.scss')
-rw-r--r--src/components/TrafficNow.module.scss29
1 files changed, 24 insertions, 5 deletions
diff --git a/src/components/TrafficNow.module.scss b/src/components/TrafficNow.module.scss
index 0fca7ef..5ae96ac 100644
--- a/src/components/TrafficNow.module.scss
+++ b/src/components/TrafficNow.module.scss
@@ -4,10 +4,26 @@
flex-wrap: wrap;
display: grid;
- grid-template-columns: repeat(auto-fill, 160px);
- grid-gap: 15px;
- justify-content: center;
- // max-width: 1000px;
+ grid-gap: 10px;
+ grid-template-columns: 90%;
+ /* 当屏幕宽度大于300像素时,设置为一行两列 */
+ @media only screen and (min-width: 300px) {
+ grid-template-columns: 49% 49%;
+ }
+
+ /* 当屏幕宽度大于600像素时,设置为一行三列 */
+ @media only screen and (min-width: 600px) {
+ grid-template-columns: repeat(auto-fill, 32%);
+ }
+ /* 当屏幕宽度大于1000像素时,设置为一行四列 */
+ @media only screen and (min-width: 1000px) {
+ grid-template-columns: repeat(auto-fill, 24%);
+ }
+ /* 当屏幕宽度大于1000像素时,设置为一行四列 */
+ @media only screen and (min-width: 1200px) {
+ grid-template-columns: repeat(auto-fill, 15%);
+ }
+ justify-content: space-between;
.sec {
padding: 10px;
@@ -20,7 +36,10 @@
}
div:nth-child(2) {
padding: 10px 0 0;
- font-size: 1.3em;
+ font-size: 1.2em;
+ @media only screen and (min-width: 720px) {
+ font-size: 1.1em;
+ }
}
}
}