CSS Target Event
How do I make an css target event?
What is a css target event? How do you make a css target event? This script and codes were developed by Elad Shechter on 13 July 2022, Wednesday.
CSS Target Event - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>CSS Target Event</title> <link rel="stylesheet" href="css/style.css">
</head>
<body> <p>Click on one of the buttons</p>
<a href="#item1" class="button">image 1</a>
<a href="#item2" class="button">image 2</a>
<div class="container"> <img id="item1" src="http://distilleryimage0.s3.amazonaws.com/572f3e0663f711e2a74422000a1ddb8e_7.jpg" /> <img id="item2" src="http://distilleryimage0.s3.amazonaws.com/bc6ab010bd3a11e2988a22000ae9082c_7.jpg" />
</div>
</body>
</html>
CSS Target Event - Script Codes CSS Codes
/*set size to contaier of images*/
.container{ width:200px; height:200px; background-color:#ddd;
}
/*hide images & set image size*/
.container img {display:none; width:200px;}
/*set link to look like buttons*/
.button{ font-weight:bold; text-transform:uppercase; display:inline-block; margin-right:10px; color:white; display:ibline-block; background-color:#5562c1; padding:10px; border:solid 2px #333; border-radius:10px; text-decoration:none; margin-bottom:10px;
}
a:hover{background-color:#3f498e;}
.container img:target{display:block;}
Developer | Elad Shechter |
Username | elad2412 |
Uploaded | July 13, 2022 |
Rating | 3 |
Size | 1,783 Kb |
Views | 22,264 |
Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!
Name | Size |
Pure CSS Image Gallery | 4,950 Kb |
SAVE STATE in CSS Animation - no JS | 2,334 Kb |
Background clip and origin | 1,732 Kb |
Making seperator - select all elements except from the first one | 1,508 Kb |
Keyboared buttons 3d | 1,556 Kb |
Box-sizing | 1,572 Kb |
Px to rem | 1,435 Kb |
PURE CSS GAME - NO JS | 5,216 Kb |
Dynamic element size via CSS position manipulation | 1,490 Kb |
Responsive Background Images | 1,582 Kb |
Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!
Name | Username | Size |
Feedback Page | TessDiNapoli | 2,836 Kb |
Drifting Clouds | Benedikte | 2,247 Kb |
Sass random color animation | Jotavejv | 4,827 Kb |
Blackberry Mock | Zacharyolson | 1,865 Kb |
DFF Website | Hawcubite | 10,123 Kb |
Foundation 5 Menu - Accessibility | Xporter | 1,999 Kb |
A Pen by Malith Hettiarachchi | MalZiiirA | 5,531 Kb |
Flat UI - Checkbox FIX | ARS | 2,663 Kb |
Vertical Pan Hammer.js example | Jtangelder | 2,144 Kb |
Html5-canvas-snow-effect | MariamMassadeh | 2,609 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!