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

[2주차 기본/생각 과제] #9

Open
wants to merge 13 commits 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
12 changes: 12 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
const button = document.getElementById('top');

let opacity = 0;
button.style.opacity = opacity;
window.addEventListener('scroll', function() {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

굳굳!!


const scrollPosition = window.scrollY / (document.documentElement.scrollHeight - window.innerHeight);

opacity = scrollPosition;

button.style.opacity = opacity;
});
283 changes: 165 additions & 118 deletions problem4.css
Original file line number Diff line number Diff line change
@@ -1,126 +1,173 @@

h1{
background-color:rgb(180, 238, 219); color:black;
text-align: center;
width: 50%;
border-bottom: 2px solid gray;
margin:0px auto 15px auto;
}
.totalsum{
border-radius:20px;
border: 5px solid black;
background-color: rgb(180, 238, 219); color:black;
text-align: center;
width:50%; height:100%;
margin:0 auto 0 auto;
}
.totalsum p{
font-size:40px;
margin-bottom:15px;
}
h3{
margin:5px 0 5px 0;
}
div.total
{
display: flex;
justify-content: space-evenly;
margin-bottom: 10px;
}
div.allincome{
color:blue;
}
span.plus-button {
display:inline-block;
width:20px;
height:20px;
border-radius: 100%;
border-color: black;
border: 1px solid;
font-size: 14px;
background-color: aliceblue;
}
div.alloutcome{
color:red;
h1 {
background-color: rgb(180, 238, 219);
color: black;
text-align: center;
width: 50%;
border-bottom: 2px solid gray;
margin: 0px auto 15px auto;
}
.totalsum {
border-radius: 20px;
border: 5px solid black;
background-color: rgb(180, 238, 219);
color: black;
text-align: center;
width: 50%;
height: 100%;
margin: 0 auto 0 auto;
}
.totalsum p {
font-size: 40px;
margin: 0px 0 15px 0;
}
h3 {
margin: 5px 0 5px 0;
}
div.total {
display: flex;
justify-content: space-evenly;
margin-bottom: 10px;
}
div.allincome {
color: blue;
}
span.plus-button {
display: inline-block;
width: 20px;
height: 20px;
border-radius: 100%;
border-color: black;
border: 1px solid;
font-size: 14px;
background-color: aliceblue;
}
div.alloutcome {
color: red;
}
span.minus-button {
display:inline-block;
width: 20px;
height: 20px;
border-radius: 100%;
border-color: black;
border: 1px solid;
font-size: 14px;
background-color: aliceblue;
display: inline-block;
width: 20px;
height: 20px;
border-radius: 100%;
border-color: black;
border: 1px solid;
font-size: 14px;
background-color: aliceblue;
}
div.date {
box-sizing: border-box;
width:50%; margin:30px auto 0 auto;
display:flex;
justify-content: center;
border-top: solid 2px;
border-color: gray;
padding:10px 0 20px 0;
}
button.left, .right{
border:none;
background-color: white;
box-sizing: border-box;
width: 50%;
margin: 30px auto 0 auto;
display: flex;
justify-content: center;
border-top: solid 2px;
border-color: gray;
padding: 10px 0 20px 0;
}
button.left,
.right {
border: none;
background-color: white;
}
section.main {
box-sizing: border-box;
width:50%;
margin:0 auto 0 auto;
display: flex;
flex-direction: row;
justify-content: space-between;
border-bottom: solid 1px;
padding-bottom: 20px;
border-color: rgb(190, 188, 188);
}
button.income, button.outcome {
border-radius: 10px;
background-color: rgb(17, 127, 90);
color:white;
box-sizing: border-box;
width: 50%;
margin: 0 auto 0 auto;
display: flex;
flex-direction: row;
justify-content: space-between;
border-bottom: solid 1px;
padding-bottom: 20px;
border-color: rgb(190, 188, 188);
}
button.income,
button.spend {
border: none;
background-color: white;
}
div.item {
box-sizing: border-box;
width: 50%;
margin: 15px auto 10px auto;
display: flex;
justify-content: space-between;
border-radius: 30px;
background-color: rgb(180, 238, 219);
color: black;
padding: 15px;
}
.category {
font-size: 14px;
}
section.details {
height: 400px;
overflow-y: scroll;
width: 50%;
margin: 0 auto 0 auto;
}
.money_minus {
color: red;
}
.money_plus {
color: blue;
}
button.x {
border: none;
background-color: rgb(180, 238, 219);
}
footer {
width: 50%;
margin: 0 auto 0 auto;
background-color: rgb(180, 238, 219);
border-radius: 5rem;
height: 2rem;
}
div.plus_button {
display: flex;
justify-content: center;
text-align: center;
height: 2rem;
}
.last {
display: inline-block;
width: 10%;
border: none;
margin: 0;
padding: 0;
border-radius: 5rem;
background-color: rgb(112, 179, 112);
}

.modal {
display: none;
position: fixed;
z-index: 1;
left: 0;
top: 0;
width: 100%;
height: 100%;
overflow: auto;
background-color: rgba(0, 0, 0, 0.4);
}

.modal-content {
background-color: #fefefe;
margin: 15% auto;
padding: 20px;
border: 1px solid #888;
width: 80%;
}

.close {
color: #aaa;
float: right;
font-size: 28px;
font-weight: bold;
}

.close:hover,
.close:focus {
color: black;
text-decoration: none;
cursor: pointer;
}
button.income:hover, button.outcome:hover {
background-color:pink;
color:black;
}
div.item{
box-sizing: border-box;
width:50%;
margin:15px auto 10px auto;
display: flex;
justify-content: space-between;
border-radius: 30px;
background-color: rgb(180, 238, 219);
color:black; padding:15px;
}
.category{
font-size: 14px;
}
section.details{
height: 400px;
overflow-y: scroll;
width:50%;
margin:0 auto 0 auto;
}
.money_minus{
color:red;
}
.money_plus{
color:blue;
}
button.x{
border:none;
background-color: rgb(180, 238, 219);
}
footer.plus_button{
text-align: center;
}
button.last{
display:inline-block;
width:50%;
margin:0 auto 0 auto;
}
Loading