-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
148 additions
and
58 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
.flip-container { | ||
position: relative; | ||
width: 300px; | ||
height: 300px; | ||
margin: 100px auto; | ||
display: flex; | ||
align-items: flex-start; | ||
/* 对齐顶部 */ | ||
justify-content: flex-end; | ||
/* 将文字放置右上角 */ | ||
} | ||
|
||
.image-container { | ||
position: relative; | ||
position: relative; | ||
width: 300px; | ||
height: 300px; | ||
} | ||
|
||
.image-container img { | ||
position: absolute; | ||
top: 0; | ||
left: 0; | ||
width: 100%; | ||
height: 100%; | ||
transition: all 1s; | ||
} | ||
|
||
.image-container img:first-child { | ||
z-index: 1; | ||
backface-visibility: hidden; | ||
} | ||
|
||
.image-container img:last-child { | ||
z-index: 0; | ||
transform: rotateY(180deg); | ||
backface-visibility: hidden; | ||
} | ||
|
||
.image-container:hover img:first-child { | ||
transform: rotateY(180deg); | ||
z-index: 2; | ||
} | ||
|
||
.image-container:hover img:last-child { | ||
transform: rotateY(0deg); | ||
z-index: 3; | ||
} | ||
|
||
.hover-block { | ||
position: absolute; | ||
top: 10px; | ||
/* 调整文字位置 */ | ||
right: -20px; | ||
background-color: rgba(0, 0, 0, 0.6); | ||
color: #fff; | ||
padding: 5px 10px; | ||
border-radius: 4px; | ||
font-size: 14px; | ||
z-index: 10; | ||
/* 确保文字在图片上方 */ | ||
display: none; | ||
/* 默认隐藏 */ | ||
} | ||
|
||
.image-container:hover+.hover-block { | ||
display: block; | ||
/* 鼠标悬停时显示文字 */ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,41 @@ | ||
# Welcome to 黯然's Blog | ||
|
||
- [你可能感兴趣的](./blog/index.md)-> | ||
一些有用的文章(存疑) | ||
- [关于我](./about.md)-> | ||
我是个...人? | ||
- 我的足迹-> | ||
保持对这个世界的好奇心 | ||
<div class="flip-container"> | ||
<div class="image-container"> | ||
<img src="../assets/images/logo_noBG_circle.png" alt="Front Image"> | ||
<a href="/template/" > | ||
<img src="../assets/images/self_shoot.png" alt="Back Image"> | ||
</a> | ||
</div> | ||
<div class="hover-block"> | ||
点我看看! | ||
</div> | ||
</div> | ||
|
||
<div class="grid cards" markdown> | ||
|
||
- :material-heart:{ .lg .middle } __你可能感兴趣的__ | ||
|
||
--- | ||
|
||
一些有用的文章(存疑) | ||
|
||
[:octicons-arrow-right-24: 去看看](./blog/index.md) | ||
|
||
- :material-emoticon-cool-outline:{ .lg .middle } __关于我__ | ||
|
||
--- | ||
|
||
我是个...人? | ||
|
||
[:octicons-arrow-right-24: 了解一下](./about.md) | ||
|
||
- :material-foot-print:{ .lg .middle } __我的足迹__ | ||
|
||
--- | ||
|
||
保持对这个世界的好奇心 | ||
|
||
[:octicons-arrow-right-24: 施工中](#) | ||
|
||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
const container = document.querySelector('.flip-container'); | ||
|
||
container.addEventListener('mouseover', () => { | ||
container.classList.add('hover'); | ||
}); | ||
|
||
container.addEventListener('mouseout', () => { | ||
container.classList.remove('hover'); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,6 +12,7 @@ tags: | |
# Template | ||
|
||
这是一个标准模板 | ||
|
||
this is a stander template | ||
|
||
<!-- more --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters