Küçük Mesaj Ekranı (Toast) Yapımı
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="1.css">
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
body{
overflow: hidden;
}
.kart{
background-color: #e4e4e4;
height: 100px;
width: 300px;
right: -300px;
position: absolute;
bottom: 1%;
border-radius: 25px;
animation: fade-out 6s forwards;
}
img{
position: relative;
position: absolute;
margin: 10px;
height: 75px;
width: 75px;
border-radius: 50%;
}
.ad{
position: absolute;
left: 40%;
top: 35%;
font-size: 20px;
}
.saat{
position: absolute;
left: 52%;
top: 56%;
color: #5c5c5c;
font-size: 70%;
}
@keyframes fade-out{
40%{
right: 20px;
}
60%{
right: 20px;
}
100%{
right: -300px;
}
}
</style>
</head>
<body>
<div class="kart">
<img src="./bb.jpg">
<div class="ad"><strong>Shinji(Sinigami)</strong></div>
<div class="saat">bugün 21:50</div>
</div>
</body>
</html>
<html>
<head>
<link rel="stylesheet" href="1.css">
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
body{
overflow: hidden;
}
.kart{
background-color: #e4e4e4;
height: 100px;
width: 300px;
right: -300px;
position: absolute;
bottom: 1%;
border-radius: 25px;
animation: fade-out 6s forwards;
}
img{
position: relative;
position: absolute;
margin: 10px;
height: 75px;
width: 75px;
border-radius: 50%;
}
.ad{
position: absolute;
left: 40%;
top: 35%;
font-size: 20px;
}
.saat{
position: absolute;
left: 52%;
top: 56%;
color: #5c5c5c;
font-size: 70%;
}
@keyframes fade-out{
40%{
right: 20px;
}
60%{
right: 20px;
}
100%{
right: -300px;
}
}
</style>
</head>
<body>
<div class="kart">
<img src="./bb.jpg">
<div class="ad"><strong>Shinji(Sinigami)</strong></div>
<div class="saat">bugün 21:50</div>
</div>
</body>
</html>
Yorumunuzu Ekleyin