The implementation method is very simple: set the img element as a block element (display:block;) and assign a padding value.
img {
display:block; b
ackground:url('parallax.gif') no-repeat bottom left; padding:93px 100px 75px 100px;}
According to the above principle, by analogy, through a similar method, we can also set bilateral sides for the img element:
img {
display:block;
padding:1px;
background :red;
border:1px solid black;
}
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