HTMLify

wtopagu css
Views: 77 | Author: cody
@import url('https://fonts.googleapis.com/css2?family=Kanit:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&family=Montserrat:ital,wght@0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');

html {
        box-sizing: border-box;
        scroll-behavior: smooth;
        font-family: "Kanit";
        margin: 0;
        padding: 0;
    }

body {
        color: rgb(82, 69, 49);
        background-color: rgb(252, 252, 252);
    }

header {
        display: flex;
        justify-content: center;
        background-color: rgb(252, 250, 229);
        height: 300px;
        margin-bottom: 80px;
    }

label {
        cursor: pointer;
    }

h1 {
        color: rgb(252, 252, 252);
        font-weight: 900;
        font-size: 36px;
        -webkit-text-stroke-width: 2px;
        -webkit-text-stroke-color: rgb(82, 69, 49);
        display: flex;
        align-items: flex-end;
        z-index: 1;
        margin-bottom: 0px;
    }

.background-img {
        margin: 10px 0px 10px 0px;
        z-index: 0;
        object-fit: cover;
        position: absolute;
        border-radius: 8px;
        height: 300px;
        width: 600px;
    }

.questions {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
.question-container {
        box-shadow: 0 2px 8px 0 rgba(82, 69, 49, 0.3), 0 3px 20px 0 rgba(82, 69, 49, 0.29);
        width: 900px;
        margin: 0px 0px 100px 0px;
        background-color: rgb(252, 250, 229);
        border: none;
        border-radius: 4px;
    }

.question {
        text-align: center;
        font-weight: 600;
        font-size: 26px;
        color: rgb(82, 69, 49);
        margin: 15px 0px 25px 0px;
    }

.answer-container {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: center;
        margin: 0px 15px 25px 15px;
    }

.answer {
        transition: all .2s ease-in-out;
        margin: 10px 10px 10px 10px;
        cursor: pointer;
    }

.answer:hover {
        transform: scale(1.1);
    }

.img-only {
        margin: 0px 20px 0px 20px;
        display: flex;
        justify-content: center;
        align-items: center;
    }

.img-text-IMG {
        z-index: 0;
        margin: 15px 0px 15px 0px;
        position: relative;
        top: 0;
        left: 0;
    }

.img-only:hover {
        transform: scale(1.25);
    }

.selector-img {
        width: 20%;
        height: 20%;
        z-index: 2;
        position: relative;
        top: -80;
        left: 40;
    }

.img-only-label {
        height: 140px;
        width: 130px;
    }

/*source: https://stackoverflow.com/questions/38132700/css-wiggle-shake-effect
this method makes an element wiggle*/
@keyframes shake {
        33% {transform: rotate(5deg);}
        66% {transform: rotate(-5deg);}
    }

.selected  {
        animation: shake 0.75s;
        box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.2), 0 3px 10px 0 rgba(0, 0, 0, 0.19);
    }

.selected.img-only {
        box-shadow: none;
    }

.not-selected {
        opacity: 0.5;
    }

.not-selected.bg-img-text {
        opacity: 0.35;
    }

.img-text {
        transition: all .2s ease-in-out;
        border-style: solid; 
        border-radius: 4px;
        border-color: rgb(82, 69, 49);
        color: rgb(82, 69, 49);
        background-color: rgb(252, 252, 252);
        width: 150px;
        height: 135px;  
        display: flex;
        justify-content: center;
        align-items: center;
        margin: 20px 10px 25px 10px;
    }

.img-text > label > img {
        width: 140px;
        height: 100px;
        padding-left: 4px;
        padding-right: 4px;
        align-items: center;
        margin-bottom: 2px;
    }

.img-text > label {
        text-align: center;
        font-weight: 400;
        font-size: 14.5px;
    }

.bg-img-text {
        transition: all .2s ease-in-out;
        border-style: solid; 
        border-radius: 4px;
        border-color: rgb(82, 69, 49);
        color: rgb(82, 69, 49);
        -webkit-text-stroke-width: 1px;
        -webkit-text-stroke-color: rgb(252, 250, 229);
        text-shadow: 3px 3px 5px #000000;
        font-weight: 800;
        font-size: 20px;
        width: 160px;
        height: 90px; 
        display: flex;
        align-items: center;
        justify-content: center;
    }

.bg-img-text > label {
        text-align: center;
    }

.text-only {
        border-style: solid; 
        border-radius: 4px;
        border-color: rgb(82, 69, 49);
        width: 210px;
        height: 45px;
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
        padding: 10px 10px 10px 10px;
        font-size: 18px;
    }


input[type=radio] {
        display: none;
    }

.button-container {
        display: flex;
        justify-content: center;
    }

#submit {
        background-color: rgb(82, 69, 49);
        color: rgb(252, 250, 229);
        font-weight: 600;
        font-size: 24px;
        border: 4px rgb(252, 250, 229);
        border-radius: 8px;
        border-style: solid;
        text-decoration: none;
        padding: 15px 15px;
        transition: all .1s ease-in-out;
    }

#submit:hover {
        background-color: rgb(252, 250, 229);
        color: rgb(82, 69, 49); 
        border: 5px rgb(82, 69, 49);
        border-style: solid;
        cursor: pointer;
    }

    /* todo fix fadeOut */
.hidden {
        display: none;
        animation: fadeOut .5s;
    }

.visible {
        display: flex;
        justify-content: center;
        align-items: center;
        transition-duration: 0.75s;
    }

.errorImg {
        display: block;
        z-index: 10;
        position: absolute;
        width: 400px;
        height: 100px;
        margin: 0px 0px 60px 270px;
    }

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

.faded {
        opacity: 0;
        animation:fadeOut 0.5s;
    }

/* have modal animate from top to bottom */
@keyframes animateToptoBottom {
    from {top: -100px; opacity: 0}
    to {top: 0; opacity: 1}
    }

.modal-container {
        flex-direction: column;
        background-color: rgb(252, 252, 252);
        width: 850px;
        height: 800px;
        position: relative;
    }

.modal-content > h3 {
        font-size: 30px;
        font-weight: 700;
        color: rgba(82, 69, 49);
        text-align: center;
    }

.modal-content > p {
        color: rgb(82, 69, 49);
        margin: 20px 30px 30px 30px;
        width: 700px;
    }

.modal-content {
        display: flex;
        flex-direction: column;
        text-align: center;
        justify-content: center;
        align-items: center;
        transform:scaleY(.01) scaleX(0);
        animation:pushOut 1s cubic-bezier(0.165, 0.840, 0.460, 1.000) forwards;
    }

@keyframes fadeIn {
        0% {
            opacity: 0;
        } 100% {
            opacity: 1;
        }
    }

@keyframes fadeOut {
        0% {
            opacity: 1;
        } 100% {
            opacity: 0;
        }
    }

@keyframes pushOut {
        0% {
            transform:scaleY(.005) scaleX(0);
        }
        50% {
            transform:scaleY(.005) scaleX(1);
        }
        100% {
            transform:scaleY(1) scaleX(1);
        }
    }

.outcome-img {
        max-height: 350px;
        max-width: 500px;
    }

.card {
        box-shadow: 0 2px 8px 0 rgba(82, 69, 49, 0.3), 0 3px 20px 0 rgba(82, 69, 49, 0.29);
        border-radius: 4px;
        margin-top: 30px;
    }

.close {
        display: flex; 
        justify-content: flex-end;
    }

#close-modal {
        margin: 10px 25px 0px 0px;
        background-color: rgba(82, 69, 49);
        border-style: solid;
        border-radius: 10px;
        border-color: rgb(252, 250, 229);
        color: rgb(252, 250, 229);
        font-weight: 800;
        transition-duration: 0.75s;
        padding: 4 10;
        font-size: 18px;
    }

#close-modal:hover {
        cursor: pointer;
    }

.end-buttons {
        display: flex;
        justify-content: space-around;
        margin-top: 20px;
    }

.end-buttons > button {
        display: flex;
        justify-content: space-around;
        background-color: rgb(82, 69, 49);
        color: rgb(252, 250, 229);
        font-weight: 600;
        font-size: 18px;
        border: 4px rgb(252, 250, 229);
        border-radius: 8px;
        border-style: solid;
        text-decoration: none;
        padding: 13px 13px;
        transition: all .1s ease-in-out;
    }

.end-buttons > button:hover {
        background-color: rgb(252, 250, 229);
        color: rgb(82, 69, 49); 
        border: 5px rgb(82, 69, 49);
        border-style: solid;
        cursor: pointer;
    }

footer {
        background-color: rgb(252, 250, 229);
        font-size: 0.75rem;
        display: flex;
        margin: 80px 0px 40px 0px;
        height: 250px;
    }

#creator-tag {
        align-self: left;
        font-weight: 800;
        width: 200px;
        font-size: 40px;
        margin: 10px 15px 0px 100px;
    }

.footerLists {
        display: flex;
        margin-left: 160px;
        flex-direction: row;
    }

.footerHeadings {
        font-weight: 700;
        font-size: 14px;
        color: rgb(82, 69, 49);
        list-style-type: none;
        width: 170px;
    }

.footerList {
        display: flex;
        flex-direction: column;
        margin-right: 80px;
    }

.footerList > a {
        font-size: 12px;
        font-weight: 400;
    }

.footerList > a:hover {
        color: rgb(136, 148, 162);
    }

.support-button {
        margin: 30px 0px 0px 125px;
        width: 60%;
    }

#jigglypuff {
        width: 60px;
        height: 60px;
        display: flex;
        justify-content: flex-end;
        align-items: flex-end;
        margin-top: 150px;
        margin-left: 50px;
    }

/* making mobile friendly */
@media (max-width: 600px) {
    header {
            margin-bottom: 40px;
        }

    h1 {
            text-align: center;
            font-size: 28px;
        }

    .question-container {
        width: 90%;
    }

    .question {
        font-size: 15px;
        margin: 5px 0px 5px 0px;
    }

    .answer-container {
        margin: 0;
    }

    .img-text-IMG {
        max-width: 110px;
        max-height: 110px;
        margin: 0;
    }

    .img-only-label {
        height: 110px;
        width: 110px;
    }

    .img-only {
        margin: 15px 0px 15px 0px;
    }

    .text-only {
        width: 40%;
        height: 20px;
        font-size: 12px;
        font-weight: 500;
        margin: 2px 2px 2px 1px;
    }

    .img-text {
        width: 40%;
        height: 40%;
    }

    .img-text > label {
        text-align: center;
        font-weight: 400;
        font-size: 12px;
        display: flex;
        flex-direction: column;
    }

    .img-text > label > img {
        width: 110px;
        height: 70px;
        padding-left: 4px;
        padding-right: 4px;
        align-items: center;
        margin-bottom: 2px;
        margin-top: 4px;
    }

    .bg-img-text {
        width: 120px;
        height: 50px;
        font-size: 18px;
    }

    .selector-img {
        top: -50;
        left: 38;
    }

    .modal-container {
        width: 93%;
        height: 96%;
    }

    #close-modal {
        margin: 8px 10px 0px 0px;
        font-size: 12px;
    }

    .card {
        margin-top: 12px;
    }

    .outcome-img {
        max-width: 300px;
        max-height: 160px;
    }

    .modal-content > p {
        margin: 30px 30px 10px 30px;
        width: 300px;
        font-size: 11.5px;
    }

    .end-buttons {
        margin-top: 0px;
    }

    .end-buttons > button {
        font-size: 12px;
        padding: 8px 8px;
    }

    #submit {
        font-size: 18px;
        padding: 10px 10px;
    }

    .background-img {
        width: 100%;
    }

    footer {
        height: auto;
        flex-direction: column;
    }

    .footerLists {
        margin: 0;
        width: 100%;
        flex-wrap: wrap
    }

    .footerList {
        margin: 0;
        width: 50%;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .footerHeadings {
        width: auto;
    }

    #creator-tag {
        width: auto;
        font-size: 22px;
        margin: 10px;
    }

    .support-button {
        margin: 10px;
        width: 150px;
    }

    .madeBy {
        display: flex;
        align-items: center;
        flex-direction: column;
    }

    .jigglyContainer {
        width: 100%;
        display: flex;
        justify-content: flex-end;
    }

    #jigglypuff {
        margin-top: 30px;
        margin-right: 30px;
        max-width: 40px;
        max-height: 40px;
    }
}

Comments