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
WBOYOriginal
2016-06-24 11:42:541594browse

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>

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

The effect is as shown below:



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