HTML preprocessors can make writing HTML more powerful or convenient. For instance, Markdown is designed to be easier to write and read for text documents and you could write a loop in Pug.
In CodePen, whatever you write in the HTML editor is what goes within the <body>
tags in a basic HTML5 template. So you don't have access to higher-up elements like the <html>
tag. If you want to add classes there that can affect the whole document, this is the place to do it.
In CodePen, whatever you write in the HTML editor is what goes within the <body>
tags in a basic HTML5 template. If you need things in the <head>
of the document, put that code here.
The resource you are linking to is using the 'http' protocol, which may not work when the browser is using https.
CSS preprocessors help make authoring CSS easier. All of them offer things like variables and mixins to provide convenient abstractions.
It's a common practice to apply CSS to a page that styles elements such that they are consistent across all browsers. We offer two of the most popular choices: normalize.css and a reset. Or, choose Neither and nothing will be applied.
To get the best cross-browser support, it is a common practice to apply vendor prefixes to CSS properties and values that require them to work. For instance -webkit-
or -moz-
.
We offer two popular choices: Autoprefixer (which processes your CSS server-side) and -prefix-free (which applies prefixes via a script, client-side).
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.
You can apply CSS to your Pen from any stylesheet on the web. Just put a URL to it here and we'll apply it, in the order you have them, before the CSS in the Pen itself.
You can also link to another Pen here (use the .css
URL Extension) and we'll pull the CSS from that Pen and include it. If it's using a matching preprocessor, use the appropriate URL Extension and we'll combine the code before preprocessing, so you can use the linked Pen as a true dependency.
JavaScript preprocessors can help make authoring JavaScript easier and more convenient.
Babel includes JSX processing.
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.
You can apply a script from anywhere on the web to your Pen. Just put a URL to it here and we'll add it, in the order you have them, before the JavaScript in the Pen itself.
If the script you link to has the file extension of a preprocessor, we'll attempt to process it before applying.
You can also link to another Pen here, and we'll pull the JavaScript from that Pen and include it. If it's using a matching preprocessor, we'll combine the code before preprocessing, so you can use the linked Pen as a true dependency.
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.
Using packages here is powered by esm.sh, which makes packages from npm not only available on a CDN, but prepares them for native JavaScript ESM usage.
All packages are different, so refer to their docs for how they work.
If you're using React / ReactDOM, make sure to turn on Babel for the JSX processing.
If active, Pens will autosave every 30 seconds after being saved once.
If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.
If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.
Visit your global Editor Settings.
<div data-controller="home">
<header class="relative flex flex-col justify-center items-center gap-4 mb-24 pt-52">
<h1 class="max-w-4xl font-bold text-3xl text-center sm:text-4xl md:text-5xl">
Optez pour une infrastructure
<span data-home-target="eco">écoresponsable</span>
et un accompagnement
<span class="relative">
personnalisé
<svg data-home-target="perso" class="absolute -bottom-1 -left-1 w-full -z-10" preserveAspectRatio="none" viewBox="0 0 267 22" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M3 19.0511C19.5 12.0511 68.6 -0.74891 133 4.05109C167 8.38453 240.9 14.4513 264.5 4.05109" stroke="url(#paint0_linear_4_269)" stroke-width="5" stroke-linecap="round" />
<defs>
<linearGradient id="paint0_linear_4_269" x1="-20" y1="3.05068" x2="278" y2="-7.94934" gradientUnits="userSpaceOnUse">
<stop stop-color="#36A5D5" />
<stop offset="1" stop-color="#3A6AAB" />
</linearGradient>
</defs>
</svg>
</span>
pour votre transformation numérique
</h1>
<div class="flex flex-col sm:flex-row gap-2">
<a href="#" class="btn">Découvrir nos offres</a>
<a href="#" class="btn btn-outline">Contactez-nous</a>
</div>
</header>
<section class="flex flex-col items-center gap-3 mb-24">
<h2 class="font-bold text-3xl text-center">Comme eux, faites-nous confiance</h2>
<div class="flex flex-wrap justify-center gap-5">
<img src="{{ asset('assets/ibm.png') }}" alt="Logo partenaire IBM" class="h-10 saturate-0 hover:filter-none hover:scale-105 transition-all">
<img src="{{ asset('assets/sydetom.png') }}" alt="Logo partenaire Sydetom" class="h-10 saturate-0 hover:filter-none hover:scale-105 transition-all">
<img src="{{ asset('assets/hexaplus.png') }}" alt="Logo partenaire Hexaplus Santé" class="h-10 saturate-0 hover:filter-none hover:scale-105 transition-all">
<img src="{{ asset('assets/cbao.png') }}" alt="Logo partenaire CBAO" class="h-10 saturate-0 hover:filter-none hover:scale-105 transition-all">
<img src="{{ asset('assets/vallespir.png') }}" alt="Logo partenaire communauté de commune du Vallespir" class="h-10 saturate-0 hover:filter-none hover:scale-105 transition-all">
</div>
</section>
<section class="flex flex-col items-center gap-6 mb-24">
<h2 class="font-bold text-3xl text-center">Découvrez nos valeurs</h2>
<div class="grid grid-cols-3 gap-6">
<div class="group min-w-[300px] min-h-[300px] p-3 bg-white outline outline-4 outline-offset-2 outline-green-400 rounded">
<div class="relative w-full h-full transition-transform duration-300 [transform-style:preserve-3d] group-hover:[transform:rotateY(180deg)]">
<div class="absolute flex flex-col justify-center items-center w-full h-full [backface-visibility:hidden]">
<img src="{{ asset('assets/nature.png') }}" alt="Image représentant l'adaptabilité" class="h-44">
<h5 class="font-bold text-lg text-center">Datacenter écoresponsable</h5>
<span class="inline-flex items-center gap-1 text-center">
En savoir plus
<i class="ph ph-arrow-right"></i>
</span>
</div>
<div class="absolute flex flex-col justify-center items-center w-full h-full [transform:rotateY(180deg)] [backface-visibility:hidden]">
<p>Notre Datacenter Adamentis est reconnu pour son engagement écoresponsable. Nous proposons des solutions simples et efficaces, conçues pour minimiser la consommation d'énergie et l'impact environnemental. Bénéficiez d'une infrastructure durable et efficiente pour vos besoins informatiques</p>
</div>
</div>
</div>
<div class="group min-w-[300px] min-h-[300px] p-3 bg-white outline outline-4 outline-offset-2 outline-green-400 rounded">
<div class="relative w-full h-full transition-transform duration-300 [transform-style:preserve-3d] group-hover:[transform:rotateY(180deg)]">
<div class="absolute flex flex-col justify-center items-center w-full h-full [backface-visibility:hidden]">
<img src="{{ asset('assets/adaptabilite.png') }}" alt="Image représentant l'adaptabilité" class="h-44">
<h5 class="font-bold text-lg text-center">L'humain au cœur des projets</h5>
<span class="inline-flex items-center gap-1 text-center">
En savoir plus
<i class="ph ph-arrow-right"></i>
</span>
</div>
<div class="absolute flex flex-col justify-center items-center w-full h-full [transform:rotateY(180deg)] [backface-visibility:hidden]">
<p>Nous plaçons l'humain au centre de nos valeurs, en privilégiant l'écoute, l'adaptabilité et l'accompagnement. Notre équipe d'experts vous guide pas à pas pour vous proposer des solutions sur mesure, en tenant compte de vos impératifs métiers, contraintes, enjeux économiques et humains</p>
</div>
</div>
</div>
<div class="group min-w-[300px] min-h-[300px] p-3 bg-white outline outline-4 outline-offset-2 outline-green-400 rounded">
<div class="relative w-full h-full transition-transform duration-300 [transform-style:preserve-3d] group-hover:[transform:rotateY(180deg)]">
<div class="absolute flex flex-col justify-center items-center w-full h-full [backface-visibility:hidden]">
<img src="{{ asset('assets/security.png') }}" alt="Image représentant l'adaptabilité" class="h-44">
<h5 class="font-bold text-lg text-center">Engagement, sécurité et transparence</h5>
<span class="inline-flex items-center gap-1 text-center">
En savoir plus
<i class="ph ph-arrow-right"></i>
</span>
</div>
<div class="absolute flex flex-col justify-center items-center w-full h-full [transform:rotateY(180deg)] [backface-visibility:hidden]">
<p>La loyauté, le respect des engagements et la sécurité sont au cœur de notre entreprise. Nous offrons un environnement sécurisé pour vos opérations numériques et nous engageons à être transparents en communiquant avec nos clients de manière ouverte et honnête pour mériter votre confiance</p>
</div>
</div>
</div>
</div>
</section>
<section id="sereniteSection" data-home-target="sereniteSection" class="relative flex flex-col items-center w-full h-full">
<p id="base" data-home-target="base">Maintenant qu'on à posé les bases, laissez-nous vous introduire à la</p>
<h2 id="serenite" data-home-target="serenite" class="box-path pt-2 text-3xl sm:text-4xl md:text-5xl uppercase overflow-hidden">Sérénité</h2>
<div id="sereniteContainer" data-home-target="sereniteContainer" class="absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2">
Test
</div>
</section>
</div>
@import url("https://fonts.googleapis.com/css?family=Signika+Negative:300,400&display=swap");
body {
font-family: "Signika Negative", sans-serif;
font-weight: 300;
margin: 0;
padding: 0 20px;
}
console.clear();
gsap.registerPlugin(ScrollTrigger);
const sereniteSection = document.getElementById("sereniteSection");
const base = document.getElementById("base");
const serenite = document.getElementById("serenite");
const sereniteContainer = document.getElementById("sereniteContainer");
let tlSerenite = gsap.timeline({
scrollTrigger: {
trigger: sereniteSection,
start: "top 25%",
end: "bottom+=2000 100%",
scrub: 1,
pin: true,
pinSpacing: "none",
markers: true
}
});
const sereniteSplit = new SplitType(serenite);
sereniteSplit.chars?.forEach((char) => {
char.style.transform = "translateY(110px)";
char.style.transition = "transform 1s cubic-bezier(0.2, 1, 0.3, 1)";
});
tlSerenite.to(sereniteSplit.chars, {
duration: 1,
y: 0,
stagger: 0.1,
ease: "power4.out"
});
tlSerenite.to(
serenite,
{
duration: 1,
letterSpacing: "0.5em",
fontWeight: "bold",
ease: "power4.out"
},
">"
);
tlSerenite.to("body", {
duration: 1,
backgroundColor: "#030712"
});
tlSerenite.add(() => {
document.body.classList.toggle("text-gray-700");
document.body.classList.toggle("text-gray-300");
}, "<");
tlSerenite.to(
base,
{
duration: 1,
alpha: 0,
ease: "power4.out"
},
"<"
);
tlSerenite.to(serenite, {
duration: 1,
letterSpacing: "0.1em",
y: -100,
alpha: 0,
ease: "power4.out"
});
// Breaks the thing
tlSerenite.to(sereniteContainer, {
xPercent: -100,
x: () => 2000,
ease: "none"
});
Also see: Tab Triggers