search
HomeWeb Front-endHTML Tutorial请问css中BACKGROUND属性图片后面ver=2是什么意思_html/css_WEB-ITnose

css background ver

请问css中BACKGROUND: url(img/passport/login/bg_top.jpg?ver=2)中ver=2是什么意思
如题,谢谢!

回复讨论(解决方案)

.navigation {	HEIGHT: 50px; BACKGROUND: url(img/passport/login/bg_top.jpg?ver=2) repeat-x; POSITION: fixed; Z-INDEX: 2000; TOP: 0px; WIDTH: 100%; box-shadow: 0 0 5px 3px #888; _position: absolute}

这个css完整的如上,应该是设置一个不动的导航条,
最后部分 _position: absolute 这个_position与POSITION: fixed;的区别是什么

_position: absolute 是IE6下HACK的写法. 意思就是只有IE6使用它;
bg_top.jpg?ver=2 这一个版本,cdn 加速相关的?.

我加上ver=2后,这个背景就看不到了。这个是什么用

我加上ver=2后,这个背景就看不到了。这个是什么用
呵呵.你加v=??什么都可以看到的.
记得前面的?

img/passport/login/bg_top.jpg?ver=2
没明白,ver=2什么意思啊?!

从字面上看version的意思。
但我没看过这样的用法,直接无视。
怀疑写错了吧?或者自动生成的?

img/passport/login/bg_top.jpg?ver=1
img/passport/login/bg_top.jpg?ver=2
img/passport/login/bg_top.jpg?ver=3
img/passport/login/bg_top.jpg?ver=4
img/passport/login/bg_top.jpg?ver=5


指定图片的url版本 防止更新的缓存

谢谢大家的回答,指定了图片的版本,有什么用呢?
to kk3k2005:
不理解“防止更新的缓存”这句是什么意思?

就好比a.html?a=123一样 a.jpg?b=123也是需要浏览器发送请求的 
URL后面的参数有什么用就得看处理这个request的程序怎么处理了

能正确读取图片的路径罢了

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
What is the purpose of the <datalist> element?What is the purpose of the <datalist> element?Mar 21, 2025 pm 12:33 PM

The article discusses the HTML <datalist> element, which enhances forms by providing autocomplete suggestions, improving user experience and reducing errors.Character count: 159

What is the purpose of the <progress> element?What is the purpose of the <progress> element?Mar 21, 2025 pm 12:34 PM

The article discusses the HTML <progress> element, its purpose, styling, and differences from the <meter> element. The main focus is on using <progress> for task completion and <meter> for stati

What is the purpose of the <meter> element?What is the purpose of the <meter> element?Mar 21, 2025 pm 12:35 PM

The article discusses the HTML <meter> element, used for displaying scalar or fractional values within a range, and its common applications in web development. It differentiates <meter> from <progress> and ex

What is the purpose of the <iframe> tag? What are the security considerations when using it?What is the purpose of the <iframe> tag? What are the security considerations when using it?Mar 20, 2025 pm 06:05 PM

The article discusses the <iframe> tag's purpose in embedding external content into webpages, its common uses, security risks, and alternatives like object tags and APIs.

How do I use HTML5 form validation attributes to validate user input?How do I use HTML5 form validation attributes to validate user input?Mar 17, 2025 pm 12:27 PM

The article discusses using HTML5 form validation attributes like required, pattern, min, max, and length limits to validate user input directly in the browser.

What is the viewport meta tag? Why is it important for responsive design?What is the viewport meta tag? Why is it important for responsive design?Mar 20, 2025 pm 05:56 PM

The article discusses the viewport meta tag, essential for responsive web design on mobile devices. It explains how proper use ensures optimal content scaling and user interaction, while misuse can lead to design and accessibility issues.

What are the best practices for cross-browser compatibility in HTML5?What are the best practices for cross-browser compatibility in HTML5?Mar 17, 2025 pm 12:20 PM

Article discusses best practices for ensuring HTML5 cross-browser compatibility, focusing on feature detection, progressive enhancement, and testing methods.

How do I use the HTML5 <time> element to represent dates and times semantically?How do I use the HTML5 <time> element to represent dates and times semantically?Mar 12, 2025 pm 04:05 PM

This article explains the HTML5 <time> element for semantic date/time representation. It emphasizes the importance of the datetime attribute for machine readability (ISO 8601 format) alongside human-readable text, boosting accessibilit

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
2 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
2 weeks agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

VSCode Windows 64-bit Download

VSCode Windows 64-bit Download

A free and powerful IDE editor launched by Microsoft

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

EditPlus Chinese cracked version

EditPlus Chinese cracked version

Small size, syntax highlighting, does not support code prompt function

MantisBT

MantisBT

Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

mPDF

mPDF

mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),