htmlimagegifgiphy

is there a way to resize background images FROM html


so, a normal way to get the background in html is this:

<style>

body {
  background-image: url('https://media.giphy.com/media/itTRilS6MUfqMCQbgZ/giphy.gif');
}

</style>

but now let's suppose i need the background to be BIGGER, so much big that GIPHY just won't allow, you can't use width='' and height='', so now is there a way i can just do i straight from the html?


Solution

  • You have background-size and background-position in CSS to play with.

    https://developer.mozilla.org/en-US/docs/Web/CSS/background-size https://developer.mozilla.org/en-US/docs/Web/CSS/background-position