我想知道为什么我无法改变图像的宽度?例如,如果我更改代码的html部分中的宽度,则不会发生任何事情。
尝试更改html中的宽度,当您更改值时没有任何事情发生Jsfiddle demo.
<div class="img4">
<a href="http://s1126.photobucket.com/user/ldocherty1/media/Screen%20Shot%202017-04-12%20at%2018.53.28_zpswixmqbb7.png.html" target="_blank"><img src="http://i1126.photobucket.com/albums/l611/ldocherty1/Screen%20Shot%202017-04-12%20at%2018.53.28_zpswixmqbb7.png" border="0" style= "width="325px height=310px" alt=" photo Screen Shot 2017-04-12 at 18.53.28_zpswixmqbb7.png"/></a>
</div>
答案 0 :(得分:1)
您需要格式化宽度和高度属性style="width:325px; height:310px;"
。
<强>替换强>
<a href="http://s1126.photobucket.com/user/ldocherty1/media/Screen%20Shot%202017-04-12%20at%2018.53.28_zpswixmqbb7.png.html" target="_blank"><img src="http://i1126.photobucket.com/albums/l611/ldocherty1/Screen%20Shot%202017-04-12%20at%2018.53.28_zpswixmqbb7.png" border="0" style= "width=325px; height=310px;" alt=" photo Screen Shot 2017-04-12 at 18.53.28_zpswixmqbb7.png"/></a>
要强>
<a href="http://s1126.photobucket.com/user/ldocherty1/media/Screen%20Shot%202017-04-12%20at%2018.53.28_zpswixmqbb7.png.html" target="_blank"><img src="http://i1126.photobucket.com/albums/l611/ldocherty1/Screen%20Shot%202017-04-12%20at%2018.53.28_zpswixmqbb7.png" border="0" style="width:325px;height:310px;" alt="photo Screen Shot 2017-04-12 at 18.53.28_zpswixmqbb7.png"/></a>