CSS Transforms

Size
3,753 Kb
Views
22,264

How do I make an css transforms?

What is a css transforms? How do you make a css transforms? This script and codes were developed by Aaron Cuddeback on 03 November 2022, Thursday.

CSS Transforms Previews

CSS Transforms - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>CSS Transforms</title> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.min.css"> <link rel="stylesheet" href="css/style.css">
</head>
<body> <html>
<head>	<title>Transform Gallery</title>	<meta name="viewport" content="width=device-width, initial-scale=1.0">	<link href='https://fonts.googleapis.com/css?family=Open+Sans:400,300,600,700,800' rel='stylesheet' type='text/css'>	<link rel="stylesheet" href="css/main.css">	<link rel="stylesheet" href="css/interactions.css">
</head>
<body>	<div class="container">	<header class="main-header clearfix">	<img class="logo" src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/548344/camera.svg">	<h1 class="name">	Transform <span>Gallery</span></h1>	</header>	<div class="content clearfix">	<!-- scale / rotate -->	<div class="photo-container"> <img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/548344/11.jpg" alt="Big Sur">	<h3>Big Sur, California</h3>	<p>Aenean lacinia bibendum nulla sed consectetur. Fusce dapibus, tellus ac cursus commodo.</p>	<a href="#" class="button">download</a>	</div>	<div class="photo-container"> <img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/548344/12.jpg" alt="Turquoise waters">	<h3>Turquoise Waters</h3>	<p>Aenean lacinia bibendum nulla sed consectetur. Fusce dapibus, tellus ac cursus commodo.</p>	<a href="#" class="button">download</a>	</div>	<div class="photo-container"> <img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/548344/13.jpg" alt="A The retro van">	<h3>The Retro Van</h3>	<p>Aenean lacinia bibendum nulla sed consectetur. Fusce dapibus, tellus ac cursus commodo.</p>	<a href="#" class="button">download</a>	</div>	<!-- scale / transform-origin -->	<div class="photo-container">	<div class="photo"> <img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/548344/14.jpg" alt="Petunia the pug"> <div class="photo-overlay"> <h3>Petunia the Pug</h3> <p>Aenean lacinia bibendum nulla sed consectetur. Fusce dapibus, tellus ac cursus commodo.</p>	</div>	</div>	<a href="#" class="button">download</a>	</div>	<div class="photo-container">	<div class="photo"> <img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/548344/15.jpg" alt="An awesome picture"> <div class="photo-overlay"> <h3>Red Facade</h3> <p>Aenean lacinia bibendum nulla sed consectetur. Fusce dapibus, tellus ac cursus commodo.</p>	</div>	</div>	<a href="#" class="button">download</a>	</div>	<div class="photo-container">	<div class="photo"> <img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/548344/16.jpg" alt="A ferris wheel"> <div class="photo-overlay"> <h3>Ferris Wheel</h3> <p>Aenean lacinia bibendum nulla sed consectetur. Fusce dapibus, tellus ac cursus commodo.</p>	</div>	</div>	<a href="#" class="button">download</a>	</div>	<!-- translate -->	<div class="photo-container">	<div class="photo slide"> <img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/548344/17.jpg" alt="Going step by step"> <div class="photo-overlay"> <h3>Step by Step</h3> <p>Aenean lacinia bibendum nulla sed consectetur. Fusce dapibus, tellus ac cursus commodo.</p>	<a href="#" class="button">download</a>	</div>	</div>	</div>	<div class="photo-container">	<div class="photo slide"> <img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/548344/18.jpg" alt="The Brooklyn Bridge"> <div class="photo-overlay"> <h3>Brooklyn Bridge</h3> <p>Aenean lacinia bibendum nulla sed consectetur. Fusce dapibus, tellus ac cursus commodo.</p>	<a href="#" class="button">download</a>	</div>	</div>	</div>	<div class="photo-container">	<div class="photo slide"> <img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/548344/19.jpg" alt="A hot air balloon"> <div class="photo-overlay"> <h3>Up in the Air</h3> <p>Aenean lacinia bibendum nulla sed consectetur. Fusce dapibus, tellus ac cursus commodo.</p>	<a href="#" class="button">download</a>	</div>	</div>	</div>	</div>	</div>
</body>
</html>
</body>
</html>

CSS Transforms - Script Codes CSS Codes

/* ================================= Base Element Styles
==================================== */
* {	box-sizing: border-box;
}
body {	font: 1em/1.5 'Open Sans', sans-serif;	color: #373737;	background: #eaeaea;	margin: 0;
}
a {	text-decoration: none;
}
h1,
h2,
h3 {	text-transform: uppercase;
}
h2 {	font-size: 1.125em;	color: #4a89ca;	font-weight: 600;	margin: 0;
}
h3 {	font-size: 1.3em;	line-height: 1.25em;	margin-top: .85em;	margin-bottom: .5em;
}
p {	font-size: .875em;	line-height: 1.4;	margin: 0 0 1.5em;
}
/* ================================= Base Layout Styles
==================================== */
/* ---- Layout Containers ---- */
.container {	width: 94.02985075%;	max-width: 1260px;	background: #fff;	margin: auto;
}
.main-header {	text-align: center;	padding: 2.8em 0;
}
.photo-container {	text-align: center;	margin-bottom: 4em;
}
.original-pos {
/*	background-color: lightgrey;*/	height: 100%;	display: block;	line-height: 0;
}
/* ---- Page Elements ---- */
.name {	font-size: 1.65em;	font-weight: 800;	margin: 0 0 1.5em;	line-height: 1;
}
.name span {	font-weight: 300;	margin-left: -7px;
}
.logo {	width: 45px;	margin-bottom: .4em;	cursor: pointer;
}
.photo {	position: relative;	line-height: 0;	margin-bottom: 2em;	overflow: hidden;
}
.photo-container img {	max-width: 100%;
}
.button {	color: #4a89ca;	width: 70%;	font-weight: 700;	display: block;	text-decoration: none;	text-transform: uppercase;	padding: 10px 0;	border: 2px solid #4a89ca;	border-radius: .5em;	margin: auto;
}
/* ---- Photo Overlay ---- */
.photo-overlay {	color: #fff;	position: absolute;	top: 0;	right: 0;	bottom: 0;	left: 0;	padding-left: 20px;	padding-right: 20px;	display: -webkit-box;	display: -ms-flexbox;	display: flex; /* For centering text inside .photo-overlay */	-webkit-box-orient: vertical;	-webkit-box-direction: normal; -ms-flex-direction: column; flex-direction: column;	-webkit-box-pack: center; -ms-flex-pack: center; justify-content: center;	-webkit-box-align: center; -ms-flex-align: center; align-items: center;	background: rgba(0,0,0, .5);
}
.photo-overlay h3 {	margin-top: 0;
}
.slide .button {	color: #fff;	padding: 20px 0;	background: rgba(74,137,202, .8);	margin: 0;
}
.slide .photo-overlay {	opacity: 1;	background: #345d88;
}
/* ---- Float clearfix ---- */
.clearfix::after {	content: " ";	display: table;	clear: both;
}
/* ================================= Media Queries
==================================== */
@media (min-width: 0) and (max-width: 768px) {	.container {	padding: 0 1.225em 2.5em;	}
}
@media (min-width: 769px) {	.container {	padding: 0 2.25em 3em;	}	.photo-container {	width: 48%;	float: left;	margin-left: 4%;	}
}
@media (min-width: 769px) and (max-width: 1024px) {	.photo-container:nth-child(2n+1) {	margin-left: 0;	clear: left;	}
}
@media (min-width: 1025px) {	.photo-container {	width: 30.63973064%;	}	.photo-container:nth-child(3n+1) {	margin-left: 0;	clear: left;	}
}
/* ================================= Photo Overlay Transitions
==================================== */
.photo-overlay {	opacity: 0;	-webkit-transition: opacity .5s;	transition: opacity .5s;
}
.photo-overlay:hover {	opacity: 1;
}
/* ================================= Button Transitions
==================================== */
.button {	-webkit-transition: background .3s, color .3s;	transition: background .3s, color .3s;
}
.button:hover {	color: #fff;	background: #4a89ca;
}
/* ================================= Image Transforms & Transitions
==================================== */
/* -- Row 1 --------- */
img { -webkit-transition: -webkit-transform .5s cubic-bezier(.7, -0.39, .31, 1.38); transition: -webkit-transform .5s cubic-bezier(.7, -0.39, .31, 1.38); transition: transform .5s cubic-bezier(.7, -0.39, .31, 1.38); transition: transform .5s cubic-bezier(.7, -0.39, .31, 1.38), -webkit-transform .5s cubic-bezier(.7, -0.39, .31, 1.38); -webkit-transform-origin: bottom right; transform-origin: bottom right; /* or */ -webkit-transform-origin: 0 0; transform-origin: 0 0; /* or */ -webkit-transform-origin: 50% 50%; transform-origin: 50% 50%;
}
img:hover { /* --ex to rotate img-------- */ -webkit-transform: rotate(10deg); transform: rotate(10deg); /* -- skews image on x axis --- */ -webkit-transform: skewX(10deg); transform: skewX(10deg); /* -- skews image on y axis ---- */ -webkit-transform: skewY(10deg); transform: skewY(10deg); /* -- increases size of image ---- */ -webkit-transform: scale(1.1) rotate(-5deg); transform: scale(1.1) rotate(-5deg); /* -first value is width second value is height ex: tranform: scale (1.5, 2); --- */ /* can only write one transform function, any other transform functions will overwrite the previous */
}
/* -- Row 2 --------- */
.photo img { -webkit-transform-origin: 0 0; transform-origin: 0 0;
}
.photo:hover img { -webkit-transform: scale(1.2); transform: scale(1.2);
}
/* -- Row 3 --------- */
.slide .photo-overlay,
.slide img { -webkit-transition: -webkit-transform .6s ease-out; transition: -webkit-transform .6s ease-out; transition: transform .6s ease-out; transition: transform .6s ease-out, -webkit-transform .6s ease-out;
}
.slide .photo-overlay { -webkit-transform: translatey(100%); transform: translatey(100%); /* or */ -webkit-transform: translatex(-100%); transform: translatex(-100%); /* or shorthand ex: transform: translate (50%, 50%); */
}
.slide:hover .photo-overlay { -webkit-transform: translatey(0); transform: translatey(0);
}
.slide:hover img { -webkit-transform: translatex(100%); transform: translatex(100%);
}
/* -- Logo ---------- */
.logo:hover { -webkit-transform: rotate(20deg); transform: rotate(20deg);
}
CSS Transforms - Script Codes
CSS Transforms - Script Codes
Home Page Home
Developer Aaron Cuddeback
Username gymratpacks
Uploaded November 03, 2022
Rating 3
Size 3,753 Kb
Views 22,264
Do you need developer help for CSS Transforms?

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!

Aaron Cuddeback (gymratpacks) Script Codes
Create amazing web content with AI!

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!