Fixing Parallax Issues with CSS -


i attempting edit pure css parallax code shown here: codepen.io/keithclark/pen/jycfw

what i'm trying edit code parallax sections half height currently. when change code 50vh, background images cut off or repeat , not display properly.

i tried changing height of slide class 50vh , #slide1:before class background-attachment: fixed; made first slide appear fine third slide still looked same.

vh , vw used abilities keep things re-sized correctly in viewport. vw/vh, can size elements relative size of viewport. viewport view in window. viewports used make webpage feel more app preventing screen moving around of mobile devices.

solution: problem selecting 4 options padding 25vh when should receive 4 explicitly defined values.

.slide {   position: relative;   padding: 12vh 25vh 12vh 25vh;   min-height: 10px;   width: 100vw;   box-sizing: border-box;   box-shadow: 0 -1px 10px rgba(0, 0, 0, .7);   transform-style: inherit; } 

(also margins)another way write out more readable is:

  padding-left: 25vh;   padding-right: 25vh;   padding-top: 12vh;   padding-bottom: 12vh; 

update solution: next guess browser compatibility issue using vh , vw i'm not extremely familiar using them , when try browser(chrome 42) works fine. there millions skin millions of cats when comes web dev. did try using different form of measurement? here link complete list of them.


Comments

Popular posts from this blog

java - Spring Data JPA: Why findOne(id) executing delete query internally? -

python - Mongodb How to add addtional information when aggregating? -

java - Incorrect order of records in M-M relationship in hibernate -