Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

width auto fit and fix bugs #3

Merged
merged 3 commits into from
Nov 13, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 39 additions & 14 deletions css/nutssss.css
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,23 @@ body {
}

.meBox {
/* 新增的*/
display: table;
position: relative;
float: left;
width: 20rem;
height: 36rem;
/* height: 0px; */
background-color: white;
margin-top: 100px;
top: -10%;
border-radius: 2%;
transition: all 0.3s;
text-align: center;
}

.meBox:hover {
width: 21rem;
height: 34rem;
/* height: 0px; */
margin: 95px 0 0 -5px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.4);
}
Expand All @@ -50,14 +54,15 @@ body {
position: relative;
top: -15%;
left: 50%;
margin-top: -4.5rem;
margin-left: -4rem;
transition: all 0.3s;
}

.meBox:hover .headPhoto {
width: 9rem;
height: 9rem;
margin: -0.5rem 0 0 -4.5rem;
margin: -5.5rem 0 0 -4.5rem;
transform: rotate(360deg);
}

Expand Down Expand Up @@ -89,7 +94,7 @@ body {
white-space: nowrap;
overflow: hidden;
animation: typing 2s steps(20, end), blink-caret .3s step-end infinite alternate;
margin: -30px 0 0 90px;
margin: 18px 0 0 90px;
transition: all 0.3s;
}

Expand All @@ -106,7 +111,7 @@ body {

.meBox-text {
width: 80%;
height: 45%;
height: 29.8%;
overflow: hidden;
text-align: center;
color: rgb(70, 70, 70);
Expand Down Expand Up @@ -139,8 +144,15 @@ body {

.meBox-Button {
width: 100%;
/*在这里该宽度*/
padding-bottom: 15rem;
transition: all 0.5s;
}
.meBox:hover .meBox-Button{
/*这里改悬浮后缩小到某个宽度*/
padding-bottom: 10rem;

}
.meBox-Button a {
display: inline-block;
float: left;
Expand All @@ -156,6 +168,7 @@ body {
.meBox-Button a:hover {
color: rgb(0, 132, 255);
font-size: 1.2rem;

}

.meBox:hover .meBox-Button a {
Expand Down Expand Up @@ -284,7 +297,9 @@ body {
margin-bottom: 30px;
/* background-color: blue; */
}

#footer p{

}
#footer a {
text-decoration: none;
color: white;
Expand All @@ -302,12 +317,13 @@ body {

.meBox {
margin-left: 3%;
margin-right: -5px;
}

.meBox:hover {
width: 21rem;
height: 34rem;
margin: 95px 0 0 2.5%;
/* height: 34rem; */
margin: 95px -5px 0 2.5%;
}

#cmdBox {
Expand All @@ -318,13 +334,16 @@ body {
@media screen and (max-width: 1120px) {
.meBox {
float: none;
/* height: 30rem; */
margin: 100px auto 100px;
}

.meBox:hover {
width: 20rem;
height: 34rem;
margin: 105px auto 100px;

/* height: 25rem; */
margin: 100px auto 100px;

}

.meBox:hover .meBox-Button a {
Expand All @@ -340,10 +359,15 @@ body {
.meBox:hover .headPhoto {
width: 8rem;
height: 8rem;
margin: -0.5rem 0 0 -4rem;
margin: -5.5rem 0 0 -4rem;
transform: rotate(360deg);
}

.meBox-Button{
margin-top: 13px;
}
.meBox:hover .meBox-text {
font-size: 1rem;
}
#cmdBox {
float: none;
margin: 0 auto 100px;
Expand All @@ -353,11 +377,12 @@ body {
@media screen and (max-width: 768px) {
.meBox {
width: 300px;
/* height: 30rem; */
}

.meBox:hover {
width: 300px;
height: 32rem;
/* height: 25rem; */
margin: 100px auto 100px;
}

Expand All @@ -377,7 +402,7 @@ body {
.meBox:hover .headPhoto {
width: 8rem;
height: 8rem;
margin: -0.5rem 0 0 -4rem;
margin: -5.5rem 0 0 -4rem;
transform: rotate(360deg);
}

Expand Down
8 changes: 7 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,12 @@
<a href="http://wpa.qq.com/msgrd?v=3&uin=3327223191&site=qq&menu=yes" target="_blank">QQ</a>
<a href="https://t.me/NiuFuyu_CN" target="_blank">Telegram</a>
<a href="https://twitter.com/NiuFuyu_CN" target="_blank">Twitter</a>
<a href="https://twitter.com/NiuFuyu_CN" target="_blank">Twitter</a>
<a href="https://twitter.com/NiuFuyu_CN" target="_blank">Twitter</a>




</div>
</div>

Expand Down Expand Up @@ -117,7 +123,7 @@
</div>

<!-- 页脚 -->
<div id="footer">
<div id="footer" style="z-index: -1;">
<p>© 2022 | <a href="https://beian.miit.gov.cn/" target="_blank">正经人都不备案的~</a>
<p>但也不一定 <a href="https://icp.gov.moe/?keyword=20224040" target="_blank">萌ICP备20224040号</a></p>
<!-- 运行时间 -->
Expand Down