Get full monitor width using CSS3

3

Is there any way to get the%% of a monitor's total% using CSS or CSS3? I know that in JS there is width that associates a width with the size of the monitor with a variable.

Now I need to know if there is a CSS in this way to get the total size of $(window).width(); since I need to insert this variable in CSS.

    
asked by anonymous 02.07.2014 / 15:58

2 answers

1

Solution posted by OP in question:

@-webkit-keyframes bounceOutRight {
   0% {
      -webkit-transform: translateX(0);
      transform: translateX(0);
   }
   100% {
      -webkit-transform: translateX(100%);
      transform: translateX(100%);
   }
}

@-webkit-keyframes bounceOutLeft {
   0% {
      -webkit-transform: translateX(0);
      transform: translateX(0);
   }
   100% {
      -webkit-transform: translateX(-100%);
      transform: translateX(-100%);
   }
}
    
02.07.2014 / 19:31
0

I do not know if this is the case, but see if "viewport-percentage lengths" is good. Ex:

 div {
    width: 100vw; // 100% viewport width
    height: 100vh; // 100% viewport height
 }

If you wanted to read about it: link
link

    
17.03.2016 / 21:58