【发布时间】:2016-12-28 16:07:12
【问题描述】:
我的页面有点问题。
查看:https://user.oc-static.com/upload/2016/12/24/14826126993639_14825671380969_123.png
问题是图像应该完全保持在右侧,但是当我更改浏览器的分辨率时图像会向左移动。 Chrome 和 Internet Explorer(不是 firefox)会出现问题
html {
height: 100%;
background: black;
}
body {
height: 100%;
margin: 0;
padding: 0;
}
table {
border: 0;
padding: 0;
margin: 0;
}
#container {
color: white;
display: flex;
overflow: hidden;
height: 100%;
}
#global {
width: 100%;
height: 100%
text-align: center;
}
#table {
width: 100%;
height: 100%;
}
#droite {
height: 100%;
text-align: right;
}
#image {
height: 100%;
display: block;
width: inherit;
}
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>test</title>
</head>
<body>
<div id="container">
<div id="global">
<table id="table">
<tbody>
<tr>
<td>d</td>
</tr>
</tbody>
</table>
</div>
<div id="droite">
<img src="//zagicien.com/test.jpg" alt="" id="image">
</div>
</div>
</body>
</html>
【问题讨论】: