Html lang="en" dir="ltr"


Download 17.53 Kb.
Sana11.02.2023
Hajmi17.53 Kb.
#1189587
Bog'liq
Документ Microsoft Word



<html lang="en" dir="ltr">
  
<head>
<meta charset="utf-8">
<script src=
"https://kit.fontawesome.com/457a315592.js" 
crossorigin="anonymous">
script>
  
<style>
.container {
background-color: green;
height: 20vh;
display: flex;
justify-content: center;
align-items: center;
}
  
.link {
height: 70px;
width: 70px;
background-color: #caf7e3;
border-radius: 35px;
text-align: center;
margin: 7px;
line-height: 80px;
}
  
a i {
transition: all 0.3s linear;
}
  
a:hover i {
transform: scale(1.5);
}
  
.youtube:hover {
color: red;
}
  
.facebook:hover {
color: blue;
}
  
.instagram:hover {
color: #e11d74;
}
  
.twitter:hover {
color: #00adb5;
}
  
.github:hover {
color: black;
}
  
.linkedin:hover {
color: #04009a;
}
style>
head>
  
<body>
<p>GFG social media link icons (Hover over the icon)p>
  
<div class="container">
<a class="link linkedin">
<i class="fab fa-2x fa-linkedin">i>
a>
<a class="link twitter">
<i class="fab fa-2x fa-twitter">i>
a>
<a class="link github">
<i class="fab fa-2x fa-github">i>
a>
<a class="link instagram">
<i class="fab fa-2x fa-instagram">i>
a>
<a class="link youtube">
<i class="fab fa-2x fa-youtube">i>
a>
<a class="link facebook">
<i class="fab fa-2x fa-facebook-f">i>
a>
div>
body>
  
html>

<html>
<head>
<title>
Get the ID of the clicked button
in JavaScript
title>
head>
 
<body style = "text-align:center;">
 
<h1 style = "color:green;" >
GeeksForGeeks
h1>
  
<p id = "GFG_UP" style =
"font-size: 15px; font-weight: bold;">
p>
 
<button id="1">Button 1button>
<button id="2">Button 2button>
<button id="3">Button 3button>
  
<p id = "GFG_DOWN" style =
"color:green; font-size: 20px; font-weight: bold;">
p>
 
<script>
var el_up = document.getElementById("GFG_UP");
var el_down = document.getElementById("GFG_DOWN");
el_up.innerHTML = "Click on button to get ID";
 
document.getElementById('1').onclick = GFG_click;
document.getElementById('2').onclick = GFG_click;
document.getElementById('3').onclick = GFG_click;
 
function GFG_click(clicked) {
el_down.innerHTML = "Button clicked, id = "
+ this.id;
}
script>
body>
html>
Download 17.53 Kb.

Do'stlaringiz bilan baham:




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling