<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>无标题文档</title>
</head>
<body style=" text-align:center; line-height:50px;">
<div style="width:100%; height:50px;">
<div style=" background:#0CF; width:100%; height:100%;">
<div style=" background:#0F0; width:50%; height:100%; border-right:solid #000 1px; float:left;">A</div>
<div style=" background:#F0F; height:100%; float:right;">B</div>
</div>
</div>
</body>
</html>
现在“B”还不能适应剩下的宽度。
最终目标使“B”在不同显示设备适应剩下的宽度。
(还请你 写 好 测 试 之后 满 足 要 求 再回答,回答时请附上 完 整 代 码,否则不追问不采纳。)
我故意写了4个,但你写的是不能解决我想要的结果。目前我只知道用table替换可以满足我的要求,因为table有自适应,但是我更想知道div怎么满足……
追答不知道你要什么样的效果 不过我做布局 没有遇到你这样的问题
HTML5
定义注释
列如注释是HTML5
定义锚
列如www.w3school.con.cn表示连链接到www.w3school.con.cn
那么按照以上的例子写出这个标签