遇到问题

Robin_bing 2013-08-18 04:44:21
初学html一枚!
<body>
<span class=lyrics align="center">
<img src="Sparks fly.jpg" alt="Sparks fly-Taylor Swift" width="500" height="500" border="1" />

Sparks Fly
</span>
Taylor Swift
The way you move is like a full on rainstorm
And I'm a house of cards
Your the kinda reckless that should send me run
But I kinda know that I won't get far
</body>



求问为什么图片不能被文字包围?而且alt没有作用?
...全文
65 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
街头小贩 2013-08-18
  • 打赏
  • 举报
回复
而且alt没有作用? re: 只有图片不显示时,才能看到alt的属性值
街头小贩 2013-08-18
  • 打赏
  • 举报
回复

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<style type="text/css">
#cover{width:100px;height:auto;background-color:#f00;}

img{float:left;display:block;background-color:#ddd;font-size:8px}
</style>
</head>

<body>
<div id="cover">

<img src="Sparks fly.jpg" alt="Sparks fly-Taylor Swift" width="50" height="50" border="1" />

Taylor Swift
The way you move is like a full on rainstorm
And I'm a house of cards
Your the kinda reckless that should send me run
But I kinda know that I won't get far
</div>
</body>
</html>

61,112

社区成员

发帖
与我相关
我的任务
社区描述
层叠样式表(英文全称:Cascading Style Sheets)是一种用来表现HTML(标准通用标记语言的一个应用)或XML(标准通用标记语言的一个子集)等文件样式的计算机语言。
社区管理员
  • HTML(CSS)社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧