Resolution_Exercices
This commit is contained in:
commit
74ae598301
37
Resolution_Exercices/#struct#
Normal file
37
Resolution_Exercices/#struct#
Normal file
@ -0,0 +1,37 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
struct person {
|
||||
int age;
|
||||
float weight;
|
||||
char name[30];
|
||||
};
|
||||
|
||||
int main()
|
||||
{
|
||||
struct person *ptr;
|
||||
int i, n;
|
||||
|
||||
printf("Enter the number of persons: ");
|
||||
scanf("%d", &n);
|
||||
|
||||
// allocating memory for n numbers of struct person
|
||||
ptr = (struct person*) malloc(n * sizeof(struct person));
|
||||
|
||||
for(i = 0; i < n; ++i)
|
||||
{
|
||||
printf("Enter first name and age respectively: ");
|
||||
|
||||
// To access members of 1st struct person,
|
||||
// ptr->name and ptr->age is used
|
||||
|
||||
// To access members of 2nd struct person,
|
||||
// (ptr+1)->name and (ptr+1)->age is used
|
||||
scanf("%s %d", (ptr+i)->name, &(ptr+i)->age);
|
||||
}
|
||||
|
||||
printf("Displaying Information:\n");
|
||||
for(i = 0; i < n; ++i)
|
||||
printf("Name: %s\tAge: %d\n", (ptr+i)->name, (ptr+i)->age);
|
||||
|
||||
return 0;
|
||||
}
|
31
Resolution_Exercices/Fichier.c
Normal file
31
Resolution_Exercices/Fichier.c
Normal file
@ -0,0 +1,31 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
int main(void){
|
||||
FILE* flux;
|
||||
size_t lu;
|
||||
int score,nom;
|
||||
char a;
|
||||
char b;
|
||||
char c;
|
||||
int i;
|
||||
flux = fopen("top10", "r");
|
||||
if (flux==NULL){
|
||||
printf("erreur d'ouverture \n");
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
for (i=0;i<10;i++){
|
||||
lu = fread(&score, sizeof(int),1,flux);
|
||||
printf("09%d", score,nom);
|
||||
lu = fread(&a,sizeof(char),1,flux);
|
||||
lu = fread(&b,sizeof(char),1,flux);
|
||||
lu = fread(&c,sizeof(char),1,flux);
|
||||
printf(" %c",a);
|
||||
printf("%c",b);
|
||||
printf("%c \n",c);
|
||||
}fclose(flux);
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
|
26
Resolution_Exercices/Fonction.c
Normal file
26
Resolution_Exercices/Fonction.c
Normal file
@ -0,0 +1,26 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
int init_ball (int posX) /*Ici on créer une fonction pour initialiser la balle sur sa position X*/
|
||||
{
|
||||
posX = 150;
|
||||
|
||||
return 0;
|
||||
|
||||
}
|
||||
/* EXEMPLE POUR UN JEU DE BALLE DONC RIEN NE SERA AFFICHER DANS LE TERMINAL C NORMAL */
|
||||
int main(void)
|
||||
{
|
||||
/*Exemple de fonctions:
|
||||
printf()
|
||||
scanf()
|
||||
*/
|
||||
|
||||
int balleX; /* balleX et posX ne sont pas les mêmes*/
|
||||
balleX = init_ball(balleX);
|
||||
/*Une partie de jeu se fait...*/
|
||||
|
||||
balleX = init_ball(balleX);
|
||||
|
||||
return 0;
|
||||
}
|
38
Resolution_Exercices/Makefile
Normal file
38
Resolution_Exercices/Makefile
Normal file
@ -0,0 +1,38 @@
|
||||
# nom de l'exécutable final
|
||||
EXEC = programme
|
||||
|
||||
# liste des fichiers source à utiliser
|
||||
SRC = main.c jeux.c ecran.c bot.c
|
||||
|
||||
# génère les fichiers objets de chaque fichier source
|
||||
OBJ = $(SRC:.c=.o)
|
||||
|
||||
# options de compilation (ajoute -Wall pour les avertissements)
|
||||
CFLAGS = -Wall -ansi -pedantic
|
||||
|
||||
# commande pour compiler
|
||||
CC = gcc
|
||||
|
||||
# permet l'éxécution avec la commande make
|
||||
all: $(EXEC)
|
||||
|
||||
# génération de l'exécutable
|
||||
$(EXEC): $(OBJ)
|
||||
$(CC) -o $(EXEC) $(OBJ) $(CFLAGS) -lgraph
|
||||
|
||||
# compilation de chaque fichier source en un fichier objet
|
||||
%.o: %.c %.h
|
||||
$(CC) -o $@ -c $< $(CFLAGS)
|
||||
|
||||
# commande pour lancer l'exécutable
|
||||
run: $(EXEC)
|
||||
./$(EXEC)
|
||||
|
||||
# nettoyage des fichiers et réinitialisation du projet afin de le relancer proprement
|
||||
clean:
|
||||
rm -f $(OBJ) $(EXEC)
|
||||
|
||||
|
||||
mrproper: clean
|
||||
rm -f $(EXEC)
|
||||
|
50
Resolution_Exercices/Pointeurs.c
Normal file
50
Resolution_Exercices/Pointeurs.c
Normal file
@ -0,0 +1,50 @@
|
||||
#include <stdio.h>
|
||||
#include<stdlib.h>
|
||||
|
||||
/*Pointeur : varible contenat l'adresse d'une autre variable
|
||||
%d -> affiche une adresse de variable ou pointeur
|
||||
|
||||
[VARIABLES]
|
||||
maVariable : valeur de la variable
|
||||
&maVariable : adresse de ma variable
|
||||
|
||||
[POINTEURS]
|
||||
*monPointeur = NULL ou *monPointeur = &maVariable
|
||||
(déclaration et initialisation d'un pointeur)
|
||||
|
||||
monPointeur : adresse de la varible pointée
|
||||
*monPointeur : valeur de la variable pointée
|
||||
&monPointeur : adresse du pointeur
|
||||
*/
|
||||
|
||||
void inverser_nombres(int *pt_nb1,int *pt_nb2) /* C'est une fonction */
|
||||
{
|
||||
int temporaire = 0; /*B*/
|
||||
temporaire = *pt_nb2; /* *pt_nb2 prend la valeur de la variable temporaire*/
|
||||
*pt_nb2 = *pt_nb1;/* *pt_nb1 prend la valeur de *pt_nb2 */
|
||||
*pt_nb1 = temporaire; /* *pt_nb1 prend la valeur de temporaire */
|
||||
}
|
||||
int main (void)
|
||||
{
|
||||
int nombreA = 15;
|
||||
int nombreB = 28;
|
||||
|
||||
int *pointeursurNombreA = &nombreA;
|
||||
int *pointeursurNombreB = &nombreB;
|
||||
|
||||
printf ("Avant : A = %d et B = %d \n", nombreA, nombreB);
|
||||
inverser_nombres(pointeursurNombreA, pointeursurNombreB);
|
||||
printf ("Après : A =%d et B = %d \n", nombreA, nombreB);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*Resultat :
|
||||
Avant : A = 15 et B = 28
|
||||
Après : A =28 et B = 15
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
|
22
Resolution_Exercices/Recursivite.c
Normal file
22
Resolution_Exercices/Recursivite.c
Normal file
@ -0,0 +1,22 @@
|
||||
#include <stdio.h>
|
||||
int sum(int n);
|
||||
|
||||
int main() {
|
||||
int number, result;
|
||||
|
||||
printf("Enter a positive integer: ");
|
||||
scanf("%d", &number);
|
||||
|
||||
result = sum(number);
|
||||
|
||||
printf("sum = %d", result);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int sum(int n) {
|
||||
if (n != 0)
|
||||
/*sum() function calls itself*/
|
||||
return n + sum(n-1);
|
||||
else
|
||||
return n;
|
||||
}
|
9
Resolution_Exercices/Strings.c
Normal file
9
Resolution_Exercices/Strings.c
Normal file
@ -0,0 +1,9 @@
|
||||
#include <stdio.h>
|
||||
int main()
|
||||
{
|
||||
char name[20];
|
||||
printf("Enter name: ");
|
||||
scanf("%s", name);
|
||||
printf("Your name is %s.", name);
|
||||
return 0;
|
||||
}
|
16
Resolution_Exercices/Strings3.c
Normal file
16
Resolution_Exercices/Strings3.c
Normal file
@ -0,0 +1,16 @@
|
||||
#include <stdio.h>
|
||||
void displayString(char str[]);
|
||||
|
||||
int main()
|
||||
{
|
||||
char str[50];
|
||||
printf("Enter string: ");
|
||||
fgets(str, sizeof(str), stdin);
|
||||
displayString(str); /* Passing string to a function. */
|
||||
return 0;
|
||||
}
|
||||
void displayString(char str[])
|
||||
{
|
||||
printf("String Output: ");
|
||||
puts(str);
|
||||
}
|
BIN
Resolution_Exercices/a.out
Executable file
BIN
Resolution_Exercices/a.out
Executable file
Binary file not shown.
24
Resolution_Exercices/calloc_and_free.c
Normal file
24
Resolution_Exercices/calloc_and_free.c
Normal file
@ -0,0 +1,24 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
int main() {
|
||||
int n, i, *ptr, sum = 0;
|
||||
printf("Enter number of elements: ");
|
||||
scanf("%d", &n);
|
||||
|
||||
ptr = (int*) calloc(n, sizeof(int));
|
||||
if(ptr == NULL) {
|
||||
printf("Error! memory not allocated.");
|
||||
exit(0);
|
||||
}
|
||||
|
||||
printf("Enter elements: ");
|
||||
for(i = 0; i < n; ++i) {
|
||||
scanf("%d", ptr + i);
|
||||
sum += *(ptr + i);
|
||||
}
|
||||
|
||||
printf("Sum = %d", sum);
|
||||
free(ptr);
|
||||
return 0;
|
||||
}
|
10
Resolution_Exercices/fgets.c
Normal file
10
Resolution_Exercices/fgets.c
Normal file
@ -0,0 +1,10 @@
|
||||
#include <stdio.h>
|
||||
int main()
|
||||
{
|
||||
char name[30];
|
||||
printf("Enter name: ");
|
||||
fgets(name, sizeof(name), stdin); /* read string*/
|
||||
printf("Name: ");
|
||||
puts(name); /* display string*/
|
||||
return 0;
|
||||
}
|
15
Resolution_Exercices/lespourcentssignifications.c
Normal file
15
Resolution_Exercices/lespourcentssignifications.c
Normal file
@ -0,0 +1,15 @@
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
int main() {
|
||||
int age = 30;
|
||||
float taille = 1.75;
|
||||
char initiale = 'A';
|
||||
|
||||
/* Utilisation de plusieurs spécificateurs de format*/
|
||||
printf("Âge : %d\n", age);
|
||||
printf("Taille : %.2f m\n", taille);/* Le 2 ici correspond au nb de chiffres derrière la virgules*/
|
||||
printf("Initiale : %c\n", initiale);
|
||||
|
||||
return 0;
|
||||
}
|
31
Resolution_Exercices/malloc_and_free.c
Normal file
31
Resolution_Exercices/malloc_and_free.c
Normal file
@ -0,0 +1,31 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
int main() {
|
||||
int n, i, *ptr, sum = 0;
|
||||
|
||||
printf("Enter number of elements: ");
|
||||
scanf("%d", &n);
|
||||
|
||||
ptr = (int*) malloc(n * sizeof(int));
|
||||
|
||||
|
||||
if(ptr == NULL) {
|
||||
printf("Error! memory not allocated.");
|
||||
exit(0);
|
||||
}
|
||||
|
||||
printf("Enter elements: ");
|
||||
for(i = 0; i < n; ++i) {
|
||||
scanf("%d", ptr + i);
|
||||
sum += *(ptr + i);
|
||||
}
|
||||
|
||||
printf("Sum = %d", sum);
|
||||
|
||||
|
||||
free(ptr);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
28
Resolution_Exercices/realloc.c
Normal file
28
Resolution_Exercices/realloc.c
Normal file
@ -0,0 +1,28 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
int main() {
|
||||
int *ptr, i , n1, n2;
|
||||
printf("Enter size: ");
|
||||
scanf("%d", &n1);
|
||||
|
||||
ptr = (int*) malloc(n1 * sizeof(int));
|
||||
|
||||
printf("Addresses of previously allocated memory:\n");
|
||||
for(i = 0; i < n1; ++i)
|
||||
printf("%pc\n",ptr + i);
|
||||
|
||||
printf("\nEnter the new size: ");
|
||||
scanf("%d", &n2);
|
||||
|
||||
/* rellocating the memory*/
|
||||
ptr = realloc(ptr, n2 * sizeof(int));
|
||||
|
||||
printf("Addresses of newly allocated memory:\n");
|
||||
for(i = 0; i < n2; ++i)
|
||||
printf("%pc\n", ptr + i);
|
||||
|
||||
free(ptr);
|
||||
|
||||
return 0;
|
||||
}
|
16
Resolution_Exercices/strcat.c
Normal file
16
Resolution_Exercices/strcat.c
Normal file
@ -0,0 +1,16 @@
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
int main() {
|
||||
char str1[100] = "This is ", str2[] = "programiz.com ", str3[]="Yes Yes !";
|
||||
|
||||
/* concatenates str1 and str2*/
|
||||
/* the resultant string is stored in str1.*/
|
||||
strcat(str1, str2);
|
||||
strcat(str1, str3);
|
||||
|
||||
puts(str1);
|
||||
puts(str2);
|
||||
puts(str3);
|
||||
|
||||
return 0;
|
||||
}
|
20
Resolution_Exercices/strcmp.c
Normal file
20
Resolution_Exercices/strcmp.c
Normal file
@ -0,0 +1,20 @@
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
int main() {
|
||||
char str1[] = "abcd", str2[] = "abCd", str3[] = "abcd";
|
||||
int result;
|
||||
|
||||
/* comparing strings str1 and str2*/
|
||||
result = strcmp(str1, str2);
|
||||
printf("strcmp(str1, str2) = %d\n", result);
|
||||
|
||||
/* comparing strings str1 and str3*/
|
||||
result = strcmp(str1, str3);
|
||||
printf("strcmp(str1, str3) = %d\n", result);
|
||||
|
||||
result = strcmp(str2,str3);
|
||||
printf("strcmp(str2,str3)=%d\n", result);
|
||||
|
||||
return 0;
|
||||
}
|
18
Resolution_Exercices/strcpy.c
Normal file
18
Resolution_Exercices/strcpy.c
Normal file
@ -0,0 +1,18 @@
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
int main() {
|
||||
char str1[20] = "C programming";
|
||||
char str2[20];
|
||||
char str3[30] = "Good Good";
|
||||
char str4[30];
|
||||
|
||||
/* copying str1 to str2*/
|
||||
/* copying str3 to str4*/
|
||||
strcpy(str2, str1);
|
||||
strcpy(str4, str3);
|
||||
|
||||
puts(str2); /* C programming*/
|
||||
puts(str4);/*Good Good*/
|
||||
return 0;
|
||||
}
|
13
Resolution_Exercices/strlen.c
Normal file
13
Resolution_Exercices/strlen.c
Normal file
@ -0,0 +1,13 @@
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
int main()
|
||||
{
|
||||
char a[20]="Program";
|
||||
char b[20]={'P','r','o','g','r','a','m','\0'};
|
||||
|
||||
/* using the %zu format specifier to print size_t*/
|
||||
printf("Length of string a = %zu \n",strlen(a));
|
||||
printf("Length of string b = %zu \n",strlen(b));
|
||||
|
||||
return 0;
|
||||
}
|
23
Resolution_Exercices/struc.c
Normal file
23
Resolution_Exercices/struc.c
Normal file
@ -0,0 +1,23 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
/*STRUCT*/
|
||||
|
||||
struct student {
|
||||
char *name;
|
||||
int age;
|
||||
float grade;
|
||||
};
|
||||
int main(void){
|
||||
struct student engStudent;
|
||||
engStudent.name ="Jon Snow";
|
||||
engStudent.age = 19;
|
||||
engStudent.grade =8.5;
|
||||
|
||||
printf("Name: %s\n, engStudent.name");
|
||||
printf("Age: %d\n, engStudent.age");
|
||||
printf("Grade: %f\n, engStudent.grade");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
35
Resolution_Exercices/struct_function.c
Normal file
35
Resolution_Exercices/struct_function.c
Normal file
@ -0,0 +1,35 @@
|
||||
#include <stdio.h>
|
||||
struct student
|
||||
{
|
||||
char name[50];
|
||||
int age;
|
||||
};
|
||||
|
||||
/* function prototype*/
|
||||
struct student getInformation();
|
||||
|
||||
int main()
|
||||
{
|
||||
struct student s;
|
||||
|
||||
s = getInformation();
|
||||
|
||||
printf("\nDisplaying information\n");
|
||||
printf("Name: %s", s.name);
|
||||
printf("\nRoll: %d", s.age);
|
||||
|
||||
return 0;
|
||||
}
|
||||
struct student getInformation()
|
||||
{
|
||||
struct student s1;
|
||||
|
||||
printf("Enter name: ");
|
||||
scanf ("%[^\n]%*c", s1.name);
|
||||
|
||||
printf("Enter age: ");
|
||||
scanf("%d", &s1.age);
|
||||
|
||||
return s1;
|
||||
}
|
||||
|
24
Resolution_Exercices/structure.c
Normal file
24
Resolution_Exercices/structure.c
Normal file
@ -0,0 +1,24 @@
|
||||
#include <stdio.h>
|
||||
struct person
|
||||
{
|
||||
int age;
|
||||
float weight;
|
||||
};
|
||||
|
||||
int main()
|
||||
{
|
||||
struct person *personPtr, person1;
|
||||
personPtr = &person1;
|
||||
|
||||
printf("Enter age: ");
|
||||
scanf("%d", &personPtr->age);
|
||||
|
||||
printf("Enter weight: ");
|
||||
scanf("%f", &personPtr->weight);
|
||||
|
||||
printf("Displaying:\n");
|
||||
printf("Age: %d\n", personPtr->age);
|
||||
printf("weight: %f", personPtr->weight);
|
||||
|
||||
return 0;
|
||||
}
|
37
Resolution_Exercices/structure_allocation.c
Normal file
37
Resolution_Exercices/structure_allocation.c
Normal file
@ -0,0 +1,37 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
struct person {
|
||||
int age;
|
||||
float weight;
|
||||
char name[30];
|
||||
};
|
||||
|
||||
int main()
|
||||
{
|
||||
struct person *ptr;
|
||||
int i, n;
|
||||
|
||||
printf("Enter the number of persons: ");
|
||||
scanf("%d", &n);
|
||||
|
||||
/*allocating memory for n numbers of struct person*/
|
||||
ptr = (struct person*) malloc(n * sizeof(struct person));
|
||||
|
||||
for(i = 0; i < n; ++i)
|
||||
{
|
||||
printf("Enter first name and age respectively: ");
|
||||
|
||||
/* To access members of 1st struct person,*/
|
||||
/* ptr->name and ptr->age is used*/
|
||||
|
||||
/* To access members of 2nd struct person,*/
|
||||
/* (ptr+1)->name and (ptr+1)->age is used*/
|
||||
scanf("%s %d", (ptr+i)->name, &(ptr+i)->age);
|
||||
}
|
||||
|
||||
printf("Displaying Information:\n");
|
||||
for(i = 0; i < n; ++i)
|
||||
printf("Name: %s\tAge: %d\n", (ptr+i)->name, (ptr+i)->age);
|
||||
|
||||
return 0;
|
||||
}
|
261
site2.html
Normal file
261
site2.html
Normal file
@ -0,0 +1,261 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="fr">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Green Cocooning - Kawaii</title>
|
||||
<link href="https://fonts.googleapis.com/css2?family=Comic+Sans+MS&display=swap" rel="stylesheet">
|
||||
<style>
|
||||
/* Global Settings */
|
||||
* {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: 'Comic Sans MS', sans-serif; /* Police mignonne */
|
||||
background-color: #f1f8f3; /* Vert pâle pastel */
|
||||
color: #3c763d; /* Vert foncé doux */
|
||||
line-height: 1.6;
|
||||
padding-bottom: 60px; /* Espace pour le footer */
|
||||
}
|
||||
|
||||
/* Header */
|
||||
header {
|
||||
background-color: #82b74b; /* Vert clair pastel */
|
||||
color: white;
|
||||
text-align: center;
|
||||
padding: 40px 20px;
|
||||
border-radius: 20px 20px 0 0; /* Coins arrondis pour un effet mignon */
|
||||
box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1); /* Ombre douce */
|
||||
}
|
||||
|
||||
header h1 {
|
||||
font-size: 4em;
|
||||
font-weight: bold;
|
||||
margin-bottom: 10px;
|
||||
text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.1); /* Ombre légère */
|
||||
}
|
||||
|
||||
header p {
|
||||
font-size: 1.2em;
|
||||
}
|
||||
|
||||
/* Navigation */
|
||||
nav {
|
||||
background-color: #a8d08d; /* Vert pastel clair */
|
||||
padding: 15px 0;
|
||||
text-align: center;
|
||||
border-radius: 10px;
|
||||
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* Ombre douce */
|
||||
}
|
||||
|
||||
nav a {
|
||||
color: white;
|
||||
text-decoration: none;
|
||||
margin: 0 20px;
|
||||
font-size: 1.2em;
|
||||
font-weight: bold;
|
||||
transition: color 0.3s ease;
|
||||
}
|
||||
|
||||
nav a:hover {
|
||||
color: #ffd700; /* Jaune mignon pour le survol */
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
/* Sections */
|
||||
section {
|
||||
padding: 20px;
|
||||
margin: 20px;
|
||||
background-color: #ffffff; /* Fond blanc doux */
|
||||
border-radius: 20px;
|
||||
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* Ombre douce */
|
||||
}
|
||||
|
||||
/* Intro Section */
|
||||
.intro img {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
border-radius: 20px; /* Coins arrondis */
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
/* Content Container */
|
||||
.content-container {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-between;
|
||||
gap: 20px;
|
||||
}
|
||||
|
||||
.content-container .box {
|
||||
width: 30%;
|
||||
background-color: #ffffff; /* Fond blanc */
|
||||
padding: 20px;
|
||||
border-radius: 15px;
|
||||
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* Ombre douce */
|
||||
text-align: center;
|
||||
transition: transform 0.3s ease-in-out;
|
||||
}
|
||||
|
||||
.content-container .box:hover {
|
||||
transform: translateY(-10px); /* Effet de levée au survol */
|
||||
}
|
||||
|
||||
.content-container .box img {
|
||||
width: 80%;
|
||||
height: auto;
|
||||
border-radius: 15px; /* Coins arrondis */
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
|
||||
.content-container .box h3 {
|
||||
margin-top: 15px;
|
||||
font-size: 1.5em;
|
||||
color: #3c763d; /* Vert foncé */
|
||||
}
|
||||
|
||||
.content-container .box p {
|
||||
margin-top: 10px;
|
||||
font-size: 1.1em;
|
||||
color: #5a5a5a;
|
||||
}
|
||||
|
||||
.content-container .box a {
|
||||
color: #ffd700; /* Jaune doux */
|
||||
text-decoration: none;
|
||||
margin-top: 10px;
|
||||
display: inline-block;
|
||||
font-weight: bold;
|
||||
font-size: 1.2em;
|
||||
}
|
||||
|
||||
.content-container .box a:hover {
|
||||
color: #3c763d;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
/* Footer */
|
||||
footer {
|
||||
background-color: #82b74b;
|
||||
color: white;
|
||||
text-align: center;
|
||||
padding: 20px;
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
border-radius: 20px 20px 0 0; /* Coins arrondis pour le footer */
|
||||
}
|
||||
|
||||
footer p {
|
||||
margin: 0;
|
||||
font-size: 1.1em;
|
||||
}
|
||||
|
||||
/* Responsive Design */
|
||||
@media screen and (max-width: 768px) {
|
||||
.content-container .box {
|
||||
width: 48%;
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (max-width: 480px) {
|
||||
header h1 {
|
||||
font-size: 2.5em;
|
||||
}
|
||||
|
||||
nav a {
|
||||
font-size: 1em;
|
||||
}
|
||||
|
||||
.content-container .box {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
footer p {
|
||||
font-size: 0.9em;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<!-- Header -->
|
||||
<header>
|
||||
<h1>Green Cocooning</h1>
|
||||
<p>Un havre de paix naturel et mignon pour l'âme et le corps</p>
|
||||
</header>
|
||||
|
||||
<!-- Navigation -->
|
||||
<nav>
|
||||
<a href="#accueil">Accueil</a>
|
||||
<a href="#conseils">Conseils</a>
|
||||
<a href="#produits">Produits Écologiques</a>
|
||||
<a href="#contact">Contact</a>
|
||||
</nav>
|
||||
|
||||
<!-- Main Section -->
|
||||
<section id="accueil" class="intro">
|
||||
<h2>Bienvenue dans l'univers du Green Cocooning</h2>
|
||||
<p>
|
||||
Le cocooning est un art de vivre qui consiste à créer un espace de confort et de bien-être.
|
||||
Ici, nous avons choisi de célébrer la nature, en intégrant des éléments verts, des matériaux naturels,
|
||||
et des ambiances apaisantes, le tout dans un cadre mignon et lumineux.
|
||||
</p>
|
||||
<img src="https://via.placeholder.com/1000x500/82b74b/ffffff?text=Green+Cocooning" alt="Cocooning naturel">
|
||||
</section>
|
||||
|
||||
<!-- Content Section -->
|
||||
<section id="conseils">
|
||||
<h2>Nos Conseils pour un Cocooning Mignon et Naturel</h2>
|
||||
<div class="content-container">
|
||||
<div class="box">
|
||||
<img src="https://via.placeholder.com/350x200/82b74b/ffffff?text=Plantes+d%27intérieur" alt="Plantes d'intérieur">
|
||||
<h3>Ajoutez des plantes d'intérieur</h3>
|
||||
<p>Les plantes apportent de la verdure et purifient l'air, créant ainsi un environnement apaisant et mignon.</p>
|
||||
</div>
|
||||
<div class="box">
|
||||
<img src="https://via.placeholder.com/350x200/82b74b/ffffff?text=Confort+d%27une%20couverture" alt="Couverture confortable">
|
||||
<h3>Investissez dans des textiles naturels</h3>
|
||||
<p>Des couvertures en laine, des coussins en coton bio et des tapis en jute ajoutent du confort à votre espace.</p>
|
||||
</div>
|
||||
<div class="box">
|
||||
<img src="https://via.placeholder.com/350x200/82b74b/ffffff?text=Ambiance+apaisante" alt="Ambiance apaisante">
|
||||
<h3>Créez une ambiance douce et apaisante</h3>
|
||||
<p>Optez pour des éclairages doux et des bougies naturelles pour une atmosphère relaxante et kawaii.</p>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- Eco-friendly Products Section -->
|
||||
<section id="produits">
|
||||
<h2>Nos Produits Écologiques</h2>
|
||||
<div class="content-container">
|
||||
<div class="box">
|
||||
<h3>Plantes en Pot</h3>
|
||||
<p>Découvrez notre collection de plantes d'intérieur pour un cadre plus vert et sain.</p>
|
||||
<a href="#">Voir les produits</a>
|
||||
</div>
|
||||
<div class="box">
|
||||
<h3>Textiles Naturels</h3>
|
||||
<p>Des coussins, couvertures et rideaux en matériaux organiques et durables.</p>
|
||||
<a href="#">Voir les produits</a>
|
||||
</div>
|
||||
<div class="box">
|
||||
<h3>Décoration Écologique</h3>
|
||||
<p>Des objets décoratifs en bois recyclé, en bambou et en matériaux naturels.</p>
|
||||
<a href="#">Voir les produits</a>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- Footer -->
|
||||
<footer id="contact">
|
||||
<p>Green Cocooning - Tous droits réservés | Contactez-nous : info@greencocooning.com</p>
|
||||
</footer>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
Loading…
x
Reference in New Issue
Block a user