This part is the html part of the Chat box, just the barebones and it doesn't have a script, the highlighted colors are where the magic happens, so let's go to the Script first, because that's the most important one out of all after all
This is where the magic happens, everything here makes the chat box functional
and it uses the .js as the extension to tell the program that this is a script that can be used not in only one file but in multiple files.
*{
margin: 0;
padding: 0;
box-sizing:border-box;
}
button {
border: none;
outline: none;
cursor: Pointer;
}
body {
font-family: Arial, Helvetica, sans-serif;
background-color: #e5e5e5;
display: flex;
justify-content: center;
height: 100vh;
width: 100%;
}
section {
max-width: 1100px;
margin: auto;
text-align: center;
padding: 0 1.5rem;
}
h1 {
font-size: 3rem;
margin-bottom: 2m;
}
.chat-btn {
position: fixed;
right: 50px;
bottom: 50px;
background: white;
color: black;
width: 60px;
height: 60px;
border-radius: 50%;
opacity: 0.8;
transition: opacity 0.3s;
box-shadow: 0 5px 5px rgba(0,0,0,0.4);
}
.chat-btn:hover, .submit:hover, .colors:hover {
opacity: 1;
}
.chat-popup {
display: none;
position: fixed;
bottom: 80px;
right: 120px;
height: 400px;
width: 425px;
background-color: #C7C7C7;
flex-direction: column;
justify-content: space-between;
padding: 0.75rem;
box-shadow: 5px 5px 5px rgba(0,0,0,0.4);
border-radius: 10px;
}
.show {
display: flex;
}
.chat-area {
height: 80%;
overflow-y: auto;
overflow-x: hidden;
}
.income-msg {
display: flex;
align-items: center;
}
.dan {
width: 45px;
height: 45px;
border-radius: 50%;
object-fit: cover;
}
.income-msg .msg {
background-color: white;
color: black;
padding: 0.6rem;
border-radius: 8px;
margin-left: 1rem;
box-shadow: 0 2 5px rgba(0,0,0,0.4);
border: 1px solid gray;
}
.input-area {
position: relative;
display: flex;
justify-content: center;
}
input [type="text"], input [type="name"] {
width: 100%;
border: 1px solid #ccc;
font-size: 1rem;
border-radius: 5%;
height: 2.2rem;
padding: 2px;
}
.colors {
margin-left: 0.5rem;
background-color: white;
color: white;
display: flex;
justify-content: center;
align-items: center;
border-radius: 5px;
opacity: 0.7;
}
.submit {
padding: 0.25rem 0.5rem;
margin-left: 0.5rem;
background-color: white;
color: black;
display: flex;
justify-content: center;
align-items: center;
border-radius: 5px;
border: 1px solid gray;
opacity: 0.7;
}
.out-msg {
display: flex;
justify-content: flex-end;
align-items: center;
}
.my-msg {
display: flex;
justify-content: flex-end;
margin: 0.75rem;
padding: 0.6rem;
background-color: white;
border-radius: 8px;
box-shadow: 0 2px, 5px rgba(0,0,0,0.4);
border: 1px solid gray;
word-break: break-all;
}
@media (max-width:500px) {
.chat-popup{
bottom: 120px;
right: 10%;
width: 80vw;
}
}
While everything in this section is practically all for looks and show, hence why the file name has the css extension, CSS is much better at designs than html.
<!DOCTYPE html> <html> <head> Animation <style> div { width: 2000px; height: 100px; background-color: pink; animation-name: example; animation-duration: 10s; } } </style> </head> <body> <div><h1><center> Welcome!</center></h1></div> Cryptocurrencies such as ether and dogecoin have surged to highs that few investors would have predicted a year ago. The furious run has even the most optimistic traders asking: Can it last? The forces underpinning the crypto mania mirror those that saw GameStop Corp. shares tear higher earlier this year. Excess money from stimulus checks aimed at helping the most vulnerable make rent has also found its way to brokerage accounts that offer free trading. Meanwhile, people globally have spent more time at home and in front of screens as the pandemic shut businesses.Cryptocurrencies such as ether and dogecoin have surged to highs th...
<!DOCTYPE html> <html> <head> Animation <style> div { width: 2000px; height: 100px; background-color: pink; animation-name: example; animation-duration: 10s; } @keyframes example { from {background-color: red;} to {background-color: blue;} } </style> </head> <body> <div><h1><center> Welcome!</center></h1></div> Cryptocurrencies such as ether and dogecoin have surged to highs that few investors would have predicted a year ago. The furious run has even the most optimistic traders asking: Can it last? The forces underpinning the crypto mania mirror those that saw GameStop Corp. shares tear higher earlier this year. Excess money from stimulus checks aimed at helping the most vulnerable make rent has also found its way to brokerage accounts that offer free trading. Meanwhile, people globally have spent more time at home and in front of screens...
Who doesn't love sketches? they look messy but that's what's great about it! the fact that it looks so good without uniformed lines is what's fascinates me, either that or the other kind of sketches i see is when it's drawn on paper and it's usually consisted of portraits and other forms of realistic faces. For me as a cartoonist, sketches is where the drawing begins, the point a to point z, i can't do a drawing without making the proper sketch fundamentals of construction and proportions. without sketches, my drawings would actually be horribly anatomically wrong and that's not ok! You have seen those tutorials in how to draw where they start with simple shapes then in the next step it's already a face that you wanted to know how to do that process but you've been denied of it? Basically they want to teach you about how to use the constructions, nearly every drawings i work on, starts with a circle with a cross in the face, 2 circles for eyes...
Comments
Post a Comment