Home > Web Front-end > HTML Tutorial > padding对img图片并不会完全产生作用_html/css_WEB-ITnose

padding对img图片并不会完全产生作用_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 11:27:49
Original
1597 people have browsed it

padding对img图片并不会完全产生作用:
关于padding的基本用法可以参阅CSS的padding属性一章节。
但是它不是万能的,对图片就不会完全发生作用,看如下代码实例:

 

<!DOCTYPE html><html><head><meta charset=" utf-8"><meta name="author" content="http://www.softwhy.com/" /><title>蚂蚁部落</title><style>#box{  width:300px;  height:200px;  padding:40px;  background:#999;  overflow:hidden;}</style></head><body><div id="box"><img  src="demo/CSS/img/map.jpg" alt="padding对img图片并不会完全产生作用_html/css_WEB-ITnose" ></div></body></html>
Copy after login

 

由此可见,padding对图片并不是完全起作用的。

原文地址是:http://www.softwhy.com/forum.php?mod=viewthread&tid=16802

更多内容可以参阅:http://www.softwhy.com/divcss/

 

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