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

Add hover effect and responsive design to example section with fixed bug #265

Open
wants to merge 1 commit into
base: main
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
25 changes: 25 additions & 0 deletions .hintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"extends": [
"development"
],
"hints": {
"axe/text-alternatives": [
"default",
{
"image-alt": "off"
}
],
"axe/structure": [
"default",
{
"list": "off"
}
],
"axe/name-role-value": [
"default",
{
"link-name": "off"
}
]
}
}
12 changes: 5 additions & 7 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -164,26 +164,24 @@ <h3>Design professionals</h3>
</div>
</div>
</section>

<!-- examples section -->

<!-- examples section -->
<section class="examples-section">
<div class="container">
<div class="examples-header flex">
<h2 class="examples-heading-text">One platform, endless possibilities</h2>
<a href="#" class="secondary-button">See more examples <i class="fa-solid fa-right-long"></i></a>
</div>
<div class="examples-area flex">
<a href="#" class="examples-card">
<a href="#" class="examples-card" style="background-color: #ADD8E6;"> <!-- light blue -->
<h3 class="card-text">Can user complete a task in my software interface?</h3>
</a>
<a class="examples-card" href="#" style="background: linear-gradient(rgb(0, 0, 0, 0.1), rgb(0, 0, 0, 0.8)), url(asset\ 34.jpeg); background-size: cover;">
<a class="examples-card" href="#" style="background-color: #F7DC6F;"> <!-- light yellow -->
<h3 class="card-text">Can users find important pages on my website?</h3>
</a>
<a class="examples-card" href="#">
<a class="examples-card" href="#" style="background-color: #C6F7D0;"> <!-- light green -->
<h3 class="card-text">Is my website’s intended audience clear? </h3>
</a>
<a class="examples-card" href="#">
<a class="examples-card" href="#" style="background-color: #FFC5C5;"> <!-- light red -->
<h3 class="card-text">Do visitors understand what a page is about?</h3>
</a>
</div>
Expand Down
37 changes: 21 additions & 16 deletions style.css
Original file line number Diff line number Diff line change
Expand Up @@ -330,9 +330,10 @@ header {
}

.features-card {
margin-bottom: 12px;
flex-direction: column;
gap: 20px;
max-width: 30%;
max-width: 32%;
text-align: center;
}
.features-card:hover{
Expand Down Expand Up @@ -383,38 +384,42 @@ header {
justify-content: space-between;
margin-block: 30px;
flex-wrap: wrap;

}

.examples-card {
width: 23%;
position: relative;
height: 300px;
background: var(--secondary-text-color);
background: linear-gradient(rgb(0, 0, 0, 0.1), rgb(0, 0, 0, 0.8)), url(asset\ 35.jpeg);
background-size: cover;
border-radius: 10px; /* added border radius */
transition: 0.2s ease-out;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); /* added box shadow */

}

.examples-card:hover {
box-shadow: 0 0 10px #888;
}

.examples-card:nth-child(3) {
background: linear-gradient(rgb(0, 0, 0, 0.1), rgb(0, 0, 0, 0.8)), url(asset\ 36.jpeg);
background-size: cover;
}

.examples-card:nth-child(4) {
background: linear-gradient(rgb(0, 0, 0, 0.1), rgb(0, 0, 0, 0.8)), url(asset\ 37.jpeg);
background-size: cover;
transform: translateY(-5px); /* added hover effect */
box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
}

.card-text {
position: absolute;
bottom: 20px;
left: 20px;
right: 20px;
color: var(--secondary-text-color);
color: #607584;
/* color: var(--secondary-text-color); */
}

@media (max-width: 768px) {
.examples-card {
width: calc(50% - 20px);
}
}
@media (max-width: 480px) {
.examples-card {
width: 100%;
}
}

/* cta section */
Expand Down