Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ add another resource

JavaScript

Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

Auto Save

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                 <div class="space1"></div>
  <div class="portfolio">
				<div class="portfolio__text">
					<div class="slideText slideText--01">
						<h3>Sybil Rondeau<br>Photographe</h3>
						<ul>
							<li>Site WordPress vitrine</li>
							<li>Web Design et photographie : Sybil Rondeau</li>
							<li>Graphisme : Loeiza Coccolini</li>
						</ul>
						<p>
							Je suis photographe professionnelle depuis 2009 ! Je pratique le reportage, ce qui veut dire que je raconte des histoires en images. Le site invite les spectateurs à suivre la ligne rouge (référence à la ligne verte nantaise) qui leur fait découvrir trois types de prestation.<br>
							Une refonte vers un site sur-mesure est en cours pour un format moins rectiligne, plus dynamique et graphiquement interessant.
						</p>
						<p><a href="https://sybilrondeau.com" target="blank" alt="site Sybil Rondeau Photographe">Voir le site</a></p>
					</div>
					<div class="slideText slideText--02">
						<h3>Amime Records</h3>
						<ul>
							<li>Site WordPress vitrine</li>
							<li>Web Design, Photographie : Sybil Rondeau</li>
							<li>Graphisme : Adrien Thiot-Rader</li>
						</ul>
						<p>
							Un site ludique pour un label de musique rétro-gaming.<br>A venir : l'ajout d'un petit jeu interactif. 
						</p>
						<p><a href="https://www.amimerecords.com">Voir le site</a></p>
					</div>
					<div class="slideText slideText--03">
						<h3>Artem Nantes</h3>
						<ul>
							<li>Site WordPress vitrine</li>
							<li>Web Design : Sybil Rondeau</li>
							<li>Graphisme : Audrey Bonnafi</li>
						</ul>
						<p>
							Un site sobre qui met en valeur le graphisme.
						</p>
						<p><a href="https://www.artem-nantes.fr">Voir le site</a></p>
					</div>
				</div>
				<div class="portfolio__picture">
					<div class="portfolio__picture--01 slide"></div>
					<div class="portfolio__picture--02 slide"></div>
					<div class="portfolio__picture--03 slide"></div>
				</div>
			</div>
	<div class="space2"></div>
              
            
!

CSS

              
                *::after,
*::before,
* {
	margin: 0;
	padding: 0;
	box-sizing: inherit;
}

body {
	box-sizing: border-box;
	font-family: "Muli";
}

html {
	font-size: 62.5%;
}

h1, h2, h3 {
	font-family: "Exo";
}

.space1 {
	margin: 20vh;
}

.space2 {
	margin: 500rem;
}

.portfolio {
	width: 100%;
	height: 100vh;
	margin-bottom: 10rem;
	display: flex;
	position: relative;
	margin-bottom: 100vh;


	&__text {
		width: 50%;
		height: 100vh;
		position: relative;

		.slideText {
			position: absolute;
			top: 10rem;
			left: 10rem;

			h3 {
				margin-bottom: 1rem;
				font-size: 2.4rem;
			}

			ul li {
				font-size: 1.6rem;
				list-style: none;
				font-size: 1rem;
			}
			
			p {
				max-width: 40rem;
				font-size: 1.6rem;
				margin-top: 1rem;
				color: grey;
			}

			p  a {
				color: #f7b538;
				text-decoration: none;
				padding-bottom: .5rem;
				position: relative;
			}

			p  a::before {
				content: "";
				position: absolute;
				width: 100%;
				height: 1.4px;
				bottom: 0;
				left: 0;
				background-color: #f7b538;
				transform: scaleX(0);
				transform-origin: top right;
				transition: transform .5s cubic-bezier(1, 0, 0, 1);
			}

			p  a:hover::before {
				width: 100%;
				height: 1.4px;
				transform-origin: top left;
				transform: scaleX(1);
			}
		}
	}

	&__picture {
		width: 50%;
		height: 100vh;
		position: relative;
		overflow: hidden;

		.slide {
			width: 100%;
			height: 100vh;
			position: absolute;
			top: 0;
			left: 0;
			background-position: center;
			background-size: cover;
		}

		.portfolio__picture--01 {
			background-image: url("https://assets.codepen.io/4439736/sybil-site.jpg");
		}
		.portfolio__picture--02 {
			background-image: url("https://assets.codepen.io/4439736/amime.jpg");
		}
		.portfolio__picture--03 {
			background-image: url("https://assets.codepen.io/4439736/artem.jpg");
		}
	}
}

              
            
!

JS

              
                gsap.registerPlugin(ScrollTrigger);

const animTL = gsap.timeline({
	scrollTrigger: {
		trigger: ".portfolio",
		start: "top top",
		end: "+=100%",
		scrub: 1,
		pin: true,
		pinSpacing: false,
		snap: {snapTo: "labels", duration: {min: 0.2, max: 3}, delay: 0.5, ease: "power2.inOut"}
	}
})

.add("pic1")
.from(".portfolio__picture--02", {yPercent: 100}, "pic1")
.to(".slideText--01", {opacity: 0}, "pic1")
.from(".slideText--02", {yPercent: -30, opacity: 0}, "pic1")

.add("pic2")
.from(".portfolio__picture--03", {yPercent: 100}, "pic2")
.to(".slideText--02", {opacity: 0}, "pic2")
.from(".slideText--03", {yPercent: -30, opacity: 0}, "pic2")

.add("pic3")
.to(".slideText--03", {opacity: 0}, "pic3")

.add("end")

              
            
!
999px

Console