本文由我司收集整编,推荐下载,如有疑问,请与我司联系
如何在css中使图像与文本一致
2013/12/05 41738  I’m creating the footer of my website using html and css.
 我正在使用html和css创建我网站的页脚。
 I want to have the two facebook and twitter images in line with the text so that everything in the footer is in line with eachother
 我希望将两个facebook和twitter图像与文本一致,以便页脚中的所有内容与彼此一致
  At the moment my footer code is
css怎么创建 目前我的页脚代码是
  HTML -
 div  img src=“Images/facebook.png”  img src=“Images/twitter.png”  p Address line 1 Address line 2 Address line 3 /div !--end of footer--  Can anyone help please?
 有人可以帮忙吗?
  10
  p tags are block-level elements. Use an inline element such as span :
 标签是块级元素。使用内联元素,例如:
 div  img src=“Images/facebook.png” /  img src=“Images/twitter.png”  span  Address line 1 Address line 2 Address line 3 /span  /div  Alternatively, if you’re able to use CSS, you can define both elements as inline-block:
 或者,如果您能够使用CSS,则可以将两个元素定义为内联块:
  .t img,.t p { display: inline-block; Example 1 jsFiddle
 例1 jsFiddle
  Example 2 jsFiddle
 例2 jsFiddle
 EDIT: It might also be wise for semantics to use address , rather than span . For example:

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。