Skip to content

Commit 737dc59

Browse files
authored
Merge pull request #20 from captainblue2013/master
勉强加了一下响应式
2 parents e3edf77 + cdd0321 commit 737dc59

File tree

6 files changed

+104
-14
lines changed

6 files changed

+104
-14
lines changed

src/layouts/Footer.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,26 +7,26 @@ class Footer extends Component {
77
return (
88
<footer className="Footer">
99
<div className="row justify-content-center align-items-center footer-bg">
10-
<div className="col-xs-6">
10+
<div className="col-xs-12 col-md-6">
1111
<div className="left-content">
1212
<img src={FLogo} alt="FCC logo"></img>
1313
<p>
1414
"人人皆可编程"营造有温度的技术社区
1515
</p>
1616
</div>
1717
</div>
18-
<div className="col-xs-6">
18+
<div className="col-xs-12 col-md-6">
1919
<div className="right-content">
2020
<About />
2121
</div>
2222
</div>
2323
</div>
2424
<div className="info justify-content-center align-items-center">
2525
<div className="row">
26-
<div className="col-xs-6">
26+
<div className="col-xs-12 col-md-6">
2727
<p className="left">版权所有©2018 FCC成都社区保留</p>
2828
</div>
29-
<div className="col-xs-6">
29+
<div className="col-xs-12 col-md-6">
3030
<p className="right">
3131
FCC成都社区
3232
</p>

src/layouts/style.scss

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,3 +108,17 @@ body {
108108
}
109109
}
110110

111+
@media (max-width: 992px) {
112+
body{
113+
.App{
114+
.Footer{
115+
.left-content{
116+
text-align: center;
117+
}
118+
.right-content{
119+
text-align: center;
120+
}
121+
}
122+
}
123+
}
124+
}

src/pages/Index/Events/style.scss

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,4 +139,11 @@ $titlePanelWidth: 200px;
139139
}
140140
}
141141
}
142+
}
143+
@media(max-width:992px){
144+
.index-events{
145+
.MainContainer{
146+
overflow: hidden;
147+
}
148+
}
142149
}

src/pages/Index/Info/style.scss

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,16 @@
4444
line-height: 30px;
4545
}
4646
}
47+
}
48+
@media (max-width: 992px) {
49+
.index-info{
50+
.info-row{
51+
.ImagePanel{
52+
display: none;
53+
}
54+
.col-md-7{
55+
width: 66.66666667%;
56+
}
57+
}
58+
}
4759
}

src/pages/Index/Members/style.scss

Lines changed: 55 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
background-size: contain;
88
}
99
.members{
10-
width: 1280px;
11-
height: 810px;
12-
padding-top: 72px;
10+
width: 80%;
11+
max-width: 1280px;
12+
padding-top: 2rem;
1313
border-radius: 6px;
1414
margin: 0 auto;
1515
transform: translateY(-127px);
@@ -31,8 +31,8 @@
3131
color: rgba(0,0,0,0.1);
3232
}
3333
.members-list{
34-
padding-top: 46px;
35-
padding-bottom: 21px;
34+
padding-top: 1rem;
35+
padding-bottom: 1rem;
3636
text-align: left;
3737
}
3838
.card-img-top{
@@ -41,13 +41,11 @@
4141
}
4242
.member-item{
4343
display: inline-block;
44-
width: 220px;
45-
height: 110px;
44+
width: 18%;
4645
border-radius: 6px;
47-
padding: 25px 18px 25px 20px;
46+
padding: 1.5rem 1rem 1.5rem 2rem;
4847
font-size: 0;
49-
margin-right: 44px;
50-
margin-bottom: 25px;
48+
margin: 0 1%;
5149
color: #515151;
5250
}
5351
.member-item.last-item{
@@ -101,3 +99,50 @@
10199
white-space: nowrap;
102100
}
103101
}
102+
@media (max-width: 992px) {
103+
.members-block{
104+
height: auto;
105+
}
106+
.members{
107+
width: 98%;
108+
height: auto;
109+
padding: 1rem 0;
110+
.member-item{
111+
display: inline-block;
112+
width: 40%;
113+
border-radius: 6px;
114+
padding: 3rem 2rem 3rem 4rem;
115+
font-size: 0;
116+
margin: 0 5%;
117+
color: #515151;
118+
}
119+
.member-item.last-item{
120+
margin-right: 5%;
121+
}
122+
}
123+
}
124+
@media (max-width: 480px) {
125+
.members{
126+
width: 98%;
127+
height: auto;
128+
padding: 1rem 0;
129+
.img-block{
130+
width: 20%;
131+
height: auto;
132+
margin: 0 5%;
133+
}
134+
.content{
135+
width: 60%;
136+
margin: 0 0 0 5%;
137+
}
138+
.member-item{
139+
display: inline-block;
140+
width: 98%;
141+
border-radius: 6px;
142+
padding: 1.5rem 1rem 1.5rem 2rem;
143+
font-size: 0;
144+
margin: 0 2%;
145+
color: #515151;
146+
}
147+
}
148+
}

src/pages/Index/Slogan/style.scss

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,4 +58,16 @@
5858
bottom: -50px;
5959
}
6060
}
61+
}
62+
@media (max-width: 992px) {
63+
.index-slogan{
64+
.BannerContainer{
65+
.SloganContainer{
66+
word-wrap: break-word;
67+
}
68+
.BannerIcon{
69+
display: none;
70+
}
71+
}
72+
}
6173
}

0 commit comments

Comments
 (0)