Forms HTML
Text Input
<label for = "first-name"> First name: </label>
<input type = "text" id="first-name"> br br
<label for = "last-name"> Last name: </label>
<input type = "text" id="last-name"> br br
<input type = "submit" value="Submit" class="form-button">
<label> - използва се във формулярите за текст
<input> - използва се за поле за въвеждане, има няколко стойности които са показани по долу
type - определя типът на полето(text-текстово поле, submit-бутон за изпращане на формуляра)
value - използва се ако искаме да сложим предварителен текст в input
Checkbox vs Radio
Radio
<input type="radio" id="blue" value="blue">
<label for="blue"> син </label>
<input type="radio" id="red" value="red">
<label for="red"> червен </label>
<input type="radio" id="green" value="green">
<label for="green"> зелен </label>
<input type="radio" id="yellow" value="yellow">
<label for="yellow"> жълт </label>
<input type="radio" id="other" value="other">
<label for="other"> друг </label>
Checkbox
<input type="checkbox" id="bikr" value="bike">
<label for="blue"> bike </label>
<input type="checkbox" id="car" value="car">
<label for="red"> car </label>
<input type="checkbox" id="house" value="house">
<label for="house"> house </label>
<input type="checkbox" id="boat" value="boat">
<label for="boat"> друг </label>
<input type="checkbox" id="motorbike" value="motorbike">
<label for="motorbike"> motorbike </label>
Input editor
Red: 0
Green: 148
Blue: 170
Red: 255
Green: 255
Blue: 255
Border
Red border: 0
Green border: 148
Blue border: 170
Background color
Red border: 255
Green border: 255
Blue border: 255
.object{
border-style: solid
border-width: 0
border-radius: 0
border-color: #0094aa
background-color: #ffffff
}
.text{
font-familly: sans-serif
font-style: normal
font-weight: normal
font-size: 20
}
.object:focus{
border-color: #0094aa
background-color: #ffffff
}
Напреднал пример
Hello World!
.form {
width: 100%;
margin: 0;
padding: 0;
box-sizing: border-box;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
background: linear-gradient
(45deg, greenyellow, dodgerblue);
font-family: "Sansita Swashed", cursive;
}
.center {
position: relative;
padding: 50px 50px;
background: #fff;
border-radius: 10px;
}
.center h1 {
font-size: 2em;
border-left: 5px solid dodgerblue;
padding: 10px;
color: #000;
letter-spacing: 5px;
margin-bottom: 60px;
font-weight: bold;
padding-left: 10px;
}
.center .inputbox {
position: relative;
width: 300px;
height: 50px;
margin-bottom: 50px;
}
.center .inputbox input {
position: absolute;
top: 0;
left: 0;
width: 100%;
border: 2px solid #000;
outline: none;
background: none;
padding: 10px;
border-radius: 10px;
font-size: 1.2em;
}
.center .inputbox:last-child {
margin-bottom: 0;
}
.center .inputbox span {
position: absolute;
top: 14px;
left: 20px;
font-size: 1em;
transition: 0.6s;
font-family: sans-serif;
}
.center .inputbox input:focus ~ span,
.center .inputbox input:valid ~ span {
transform: translateX(-13px) translateY(-35px);
font-size: 1em;
}
.center .inputbox [type="button"] {
width: 50%;
background: dodgerblue;
color: #fff;
border: #fff;
}
.center .inputbox:hover [type="button"] {
background: linear-gradient
(45deg, greenyellow, dodgerblue);
}
#put{
outline: none;
border: solid #0094aa;
background-color: white;;
border-radius: 0px;
padding: 12px;
}