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

添加个人资料,改变卡片颜色 #4

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
Binary file added images/photos/overflow-scroll.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
29 changes: 12 additions & 17 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ <h2 class="title-bar">关于我们</h2>
<ul class="about-list">
<li class="list">
<div class="card">
<div class="pic pic-s1">
<div class="pic">
<!-- size 100*100 -->
<a href="#" target="_blank"><img class="photo" src="images/photos/default.jpg" alt="photo"></a>
</div>
Expand All @@ -56,7 +56,7 @@ <h3 class="nike"><a href="#" target="_blank">Nikename</a></h3>
</li>
<li class="list">
<div class="card">
<div class="pic pic-s2">
<div class="pic">
<!-- size 100*100 -->
<a href="#" target="_blank"><img class="photo" src="images/photos/default.jpg" alt="photo"></a>
</div>
Expand All @@ -77,7 +77,7 @@ <h3 class="nike"><a href="#" target="_blank">Nikename</a></h3>
</li>
<li class="list">
<div class="card">
<div class="pic pic-s3">
<div class="pic">
<!-- size 100*100 -->
<a href="#" target="_blank"><img class="photo" src="images/photos/default.jpg" alt="photo"></a>
</div>
Expand All @@ -100,7 +100,7 @@ <h3 class="nike"><a href="#" target="_blank">Nikename</a></h3>
<ul class="about-list">
<li class="list">
<div class="card">
<div class="pic pic-s4">
<div class="pic">
<!-- size 100*100 -->
<a href="#" target="_blank"><img class="photo" src="images/photos/default.jpg" alt="photo"></a>
</div>
Expand All @@ -121,31 +121,26 @@ <h3 class="nike"><a href="#" target="_blank">Nikename</a></h3>
</li>
<li class="list">
<div class="card">
<div class="pic pic-s5">
<div class="pic">
<!-- size 100*100 -->
<a href="#" target="_blank"><img class="photo" src="images/photos/default.jpg" alt="photo"></a>
<a href="https://github.com/SanzerZou" target="_blank"><img class="photo" src="images/photos/overflow-scroll.png" alt="photo"></a>
</div>
<div class="txt">
<h3 class="nike"><a href="#" target="_blank">Nikename</a></h3>
<h3 class="nike"><a href="https://github.com/SanzerZou" target="_blank">Sanzer</a></h3>
<p class="nike-team">
overflow-yourname
overflow-scroll
</p>
</div>
</div>
<div class="desc">
<p>
我是一只小鸭子,咿呀咿呀哟,我是一只小鸭子,咿呀咿呀哟,我是一只小鸭子,咿呀咿呀哟,
我是一只小鸭子,咿呀咿呀哟,我是一只小鸭子,咿呀咿呀哟,
我是一只小鸭子,咿呀咿呀哟,
我是一只小鸭子,咿呀咿呀哟,
我是一只小鸭子,咿呀咿呀哟,
我是一只小鸭子,咿呀咿呀哟,
东南大学研二通信工程学生,喜爱艺术也爱编程,所以顺其自然的爱上了前端,但由于学习时间还不是很长,所以现在还只是小菜。
</p>
</div>
</li>
<li class="list">
<div class="card">
<div class="pic pic-s6">
<div class="pic">
<!-- size: width==height, min: 100*100 -->
<a href="https://github.com/wangchi" target="_blank"><img class="photo" src="images/photos/overflow-visible.jpg" alt="photo"></a>
</div>
Expand Down Expand Up @@ -177,7 +172,7 @@ <h3 class="nike"><a href="https://github.com/wangchi" target="_blank">WalkerBe</
</div>


<!--script type="text/javascript" src="javascripts/lib/jquery.min.js"></script-->
<!--script type="text/javascript" src="javascripts/home.js"></script-->
<script type="text/javascript" src="javascripts/lib/jquery.min.js"></script>
<script type="text/javascript" src="javascripts/home.js"></script>
</body>
</html>
8 changes: 8 additions & 0 deletions javascripts/home.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
$(function(){
$(".card").mouseenter(function(){
$(this).children(".pic").addClass("pic-selected").css("background","#FF9900");
});
$(".card").mouseleave(function(){
$(this).children(".pic").removeClass("pic-selected").css("background","#27ae60");
});
});
24 changes: 2 additions & 22 deletions stylesheets/home.css
Original file line number Diff line number Diff line change
Expand Up @@ -130,31 +130,11 @@ body {
height: 100px;
border-top-left-radius: 3px;
border-bottom-left-radius: 3px;
background: #ccc;
}

.about-list .card .pic-s1 {
background: #27ae60;
}

.about-list .card .pic-s2 {
background: #ff6c60;
}

.about-list .card .pic-s3 {
background: #3498db;
}

.about-list .card .pic-s4 {
background: #969;
}

.about-list .card .pic-s5 {
background: #4dbebd;
}

.about-list .card .pic-s6 {
background: #9aba49;
.pic-selected {
border-bottom: 3px solid #CC0033;
}

.about-list .card .photo {
Expand Down