“Créer des ratios intrinsèques” Réponses codées

Créer des ratios intrinsèques

.wrapper-with-intrinsic-ratio {
	position: relative;
	padding-bottom: 20%;
	height: 0;
}

.element-to-stretch {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: teal;	
}
Lucila Chiarvetto Peralta

Créer des ratios intrinsèques

#containingBlock {
	width: 50%;
}

.videoWrapper {
	position: relative;
	padding-bottom: 56.25%;
	padding-top: 25px;
	height: 0;
}

object,
embed {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
}
Lucila Chiarvetto Peralta

Créer des ratios intrinsèques

.wrapper-with-intrinsic-ratio {
	position: relative;
	padding-bottom: 20%;
	height: 0;
}

.element-to-stretch {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: teal;	
}
Lucila Chiarvetto Peralta

Créer des ratios intrinsèques

.wrapper-with-intrinsic-ratio {
	position: relative;
	padding-bottom: 20%;
	height: 0;
}

.element-to-stretch {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: teal;	
}
Lucila Chiarvetto Peralta

Créer des ratios intrinsèques

.wrapper-with-intrinsic-ratio {
	position: relative;
	padding-bottom: 20%;
	height: 0;
}

.element-to-stretch {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: teal;	
}
Lucila Chiarvetto Peralta

Créer des ratios intrinsèques

#containingBlock {
	width: 50%;
}

.videoWrapper {
	position: relative;
	padding-bottom: 56.25%;
	padding-top: 25px;
	height: 0;
}

object,
embed {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
}
Lucila Chiarvetto Peralta

Créer des ratios intrinsèques

#containingBlock {
	width: 50%;
}

.videoWrapper {
	position: relative;
	padding-bottom: 56.25%;
	padding-top: 25px;
	height: 0;
}

object,
embed {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
}
Lucila Chiarvetto Peralta

Créer des ratios intrinsèques

.wrapper-with-intrinsic-ratio {
	position: relative;
	padding-bottom: 20%;
	height: 0;
}

.element-to-stretch {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: teal;	
}
Lucila Chiarvetto Peralta

Réponses similaires à “Créer des ratios intrinsèques”

Parcourir les réponses de code populaires par langue

Parcourir d'autres langages de code