html如下,不要使用绝对定位,能怎么做到class='div1'的元素,在一行内可自由设定其y坐标
初级html新手,css看的头疼
`<!DOCTYPE html>
<html lang="en">
<head>
<style>
p {
width: 100%;
padding: 10px;
border: 1px solid #ccc;
}
div {
display: inline-block;
}
strong {
background: #eee;
border: 1px dashed #444;
}
.div1 {
}
</style>
</head>
<body>
<p>
<div class='div1'><strong>重点强调的文本</strong></div>
<div><img src='https://www.baidu.com/img/bd_logo1.png?where=super'></div>
</p>
</body>`
</html>
没找到,还是用绝对定位吧