Is it possible to change only Y value of background position in CSS?
background-position-y is not a valid solution.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Only by reading (with JS) the current value of
background-position(using a computed style method if it isn’t set inline), parsing it to read the X value and then setting it again using the X value you just retrieved.There is no way to say “Take the background position X value from the cascade and the Y value from this” in CSS.