Docum
Docum
php
$images = [
‘image1.jpg’,
‘image2.jpg’,
‘image3.jpg’
];
?>
<head>
<style>
Body {
Margin : 0 ;
Padding : 0 ;
Background-color : #f4f4f4 ;
Header {
Background : #333 ;
Color : #fff ;
Text-align : left ;
.hero {
Position : relative ;
Overflow : hidden ;
Width : 100% ;
Max-height : 400px ;
Margin : 20px 0 ;
.hero img {
Width : 100% ;
Height : auto ;
Display : none ;
.hero img.active {
Display : block ;
.controls {
Position : absolute ;
Top : 50% ;
Width : 100% ;
Display : flex ;
Justify-content : space-between ;
Transform : translateY(-50%) ;
.button {
Border : none ;
Padding : 10px ;
Cursor : pointer ;
Margin : 10px ;
Background : white ;
Border-radius : 5px ;
.services {
Display : flex ;
Justify-content : space-around ;
.service-item {
Text-align : center ;
Padding : 10px ;
Footer {
Text-align : center ;
Background : #333 ;
Color : #fff ;
</style>
</head>
<body>
<header>
</header>
</div>
</section>
<h2>À propos</h2>
<p>Description de l’entreprise.</p>
</section>
<h2>Nos Livrables</h2>
</div>
</div>
</div>
</section>
<footer>
<script>
Let currentIndex = 0 ;
Function showImage(index) {
Images.forEach((img, i) => {
Img.classList.remove(‘active’) ;
If (i === index) {
Img.classList.add(‘active’) ;
}) ;
Document.getElementById(‘next’).addEventListener(‘click’, () => {
showImage(currentIndex) ;
}) ;
Document.getElementById(‘prev’).addEventListener(‘click’, () => {
showImage(currentIndex) ;
}) ;
</script>
</body>
</html>