Home > Web Front-end > HTML Tutorial > css3 Set background image size (reduced in thumbnail form)_html/css_WEB-ITnose

css3 Set background image size (reduced in thumbnail form)_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 11:42:54
Original
1596 people have browsed it

Of course no nonsense. Go directly to the code

<style>	#mycon	{	background:url('Tpl/1.jpg');	background-size:400px 400px;	background-repeat:no-repeat;	border-radius: 4px;	border: 1px solid #ccc;	width: 400px;	height: 400px;	}</style><div id="mycon">	原来背景图大小:970*630	这里才是战场,以缩略图的形式来将背景图设置</div>
Copy after login

background-size:400px 400px;
Copy after login
followed by setting the thumbnail width and height.

The effect is as shown below:



source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template