如何使图像彼此INLINE

时间:2015-08-05 02:48:58

标签: html css image

是的,网上有很多种方法,我尝试过但是出于某种原因,它没有用。

这是原始代码。

<!-- AD1 -->
[mycred_link amount="1" href="http://adfly/1LwMem" target="_blank"]

<img id="adfly1" src="http://bdeas.com/wp-content/uploads/2015/08/AD1.jpg" alt="ad1" width="80" height="80" />

[/mycred_link]
<script>
  $( "#adfly1" ).click(function() {
    $( "#adfly1" ).fadeOut( "slow", function() {
      // Animation complete.
    });
  });
</script>
<!-- AD1 -->

<!-- AD2 -->
[mycred_link amount="1" href="http://adfly/1M03Vs" target="_blank"]

<img id="adfly2" src="http://bdeas.com/wp-content/uploads/2015/08/AD2.jpg" alt="ad2" width="80" height="80" />

[/mycred_link]
</a>
<script>
  $( "#adfly2" ).click(function() {
    $( "#adfly2" ).fadeOut( "slow", function() {
      // Animation complete.
    });
  });
</script>
<!-- AD2 -->

<!-- AD3 -->
[mycred_link amount="1" href="http://adfly/1M04A6" target="_blank"]

<img id="adfly3" src="http://bdeas.com/wp-content/uploads/2015/08/AD3.jpg" alt="ad3" width="80" height="80" />

[/mycred_link]
</a>
<script>
  $( "#adfly3" ).click(function() {
    $( "#adfly3" ).fadeOut( "slow", function() {
      // Animation complete.
    });
  });
</script>
<!-- AD3 -->

我想让这3张图片在一行中。我试过了 - &gt;

display:inline-block

但它似乎没有用。请帮忙!

是的,adfly没有链接,但那就是stackoverflow。

HELP!

1 个答案:

答案 0 :(得分:0)

使用以下代码:

<!-- AD1 --> 
<div class="fl_lt">[mycred_link amount="1" href="http://adfly/1LwMem" target="_blank"] <img id="adfly1" src="http://bdeas.com/wp-content/uploads/2015/08/AD1.jpg" alt="ad1" width="80" height="80" /> [/mycred_link] 
<script>
  $( "#adfly1" ).click(function() {
    $( "#adfly1" ).fadeOut( "slow", function() {
      // Animation complete.
    });
  });
</script> 
</div>
<!-- AD1 --> 

<!-- AD2 -->
<div class="fl_lt"> 
[mycred_link amount="1" href="http://adfly/1M03Vs" target="_blank"] <img id="adfly2" src="http://bdeas.com/wp-content/uploads/2015/08/AD2.jpg" alt="ad2" width="80" height="80" /> [/mycred_link] </a> 
<script>
  $( "#adfly2" ).click(function() {
    $( "#adfly2" ).fadeOut( "slow", function() {
      // Animation complete.
    });
  });
</script> 
</div>
<!-- AD2 --> 

<!-- AD3 --> 
<div class="fl_lt">
[mycred_link amount="1" href="http://adfly/1M04A6" target="_blank"] <img id="adfly3" src="http://bdeas.com/wp-content/uploads/2015/08/AD3.jpg" alt="ad3" width="80" height="80" /> [/mycred_link] </a> 
<script>
  $( "#adfly3" ).click(function() {
    $( "#adfly3" ).fadeOut( "slow", function() {
      // Animation complete.
    });
  });
</script> 
</div>
<!-- AD3 -->

Css代码:

.fl_lt {float:left;width:33%}