Posts by Temístocles Schwartz • 11 points
2 posts
-
0
votes2
answers67
viewsA: Confirm Aspect Ratio of an image to trigger function
You can use a function like this: $url= "img/imagem.gif"; //url da imagem function proporcao($url){ $tam= getimagesize($url); //width = tam[0] / height = tam[1] //Retorna se largura = dobro da…
-
1
votes3
answers1052
viewsA: Image with scroll vertically and height 100%
.bg { width: 100%; height: 100vh; } If using viewport makes your job easier. The unit vh basically checks "how much % of the screen" your element will occupy