1 html css html5 css3 responsive-design
我有一个小型的个人项目,我正在努力,我似乎无法弄清楚当从桌面大小转移到移动时,如何使文本停止环绕图像
<div class="text">????????
<img src="/square.png" align="left" class="ms" alt=""/>
</div>
<div>
<span class="ms">Two paragraphs of text</span>
</div>Run Code Online (Sandbox Code Playgroud)
以下是它现在正在做的事情:
当它缩小到一定宽度时,我希望文本转移到底部
- >请添加以下HTML和css代码
- >在img标签中设置图像路径
@media (max-width: 767px) {
.image, .text { clear: both; }
}Run Code Online (Sandbox Code Playgroud)
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1" />
<title> stop text wrapping around image </title>
<link href="style.css" rel="stylesheet" type="text/css">
</head>
<body>
<div class="image">
<img src="file-path/test.jpg" align="left" class="ms" alt="image"/>
</div>
<div class="text">
<span class="ms">Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</span>
</div>
</body>
</html>Run Code Online (Sandbox Code Playgroud)