Home  >  Article  >  Web Front-end  >  How to make image ads change as the browser width changes_html/css_WEB-ITnose

How to make image ads change as the browser width changes_html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-24 12:02:571113browse


The image width is 1900px. When the browser is smaller than this width, how to change the scroll -260px; value? ?



Reply to the discussion (solution)

Just modify the background-position, or the values ​​​​of background-position-x, background-position-y, Just change them to the values ​​you want.

Set it as a percentage, or use javascript css to set it dynamically

Just add background-position: center; Thank you very much for your help

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn