Firefox浏览器在处理white-space为nowrap下的元素float为right时,会错误的换行与Chrome处理不一致。
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>FireFox Bug</title>
</head>
<body>
<div style="white-space:nowrap">
正文
<i style="float:right">右侧悬浮元素</i>
</div>
</body>
</html>
在bugzilla上可查到类似问题,最新的回复是在63中问题修复。
https://bugzilla.mozilla.org/show_bug.cgi?id=488725