作者:你的拥吻像情歌一样凄美_207 | 来源:互联网 | 2022-10-15 12:11
我发现了Safari(OS X)的问题:https :
//codepen.io/alexlouden/pen/jONyZKb
document
.querySelectorAll('.parent')
.forEach(el => {
el.addEventListener("mouseover", event => {
event.target.style.color = 'blue';
})
})
* {
box-sizing: border-box;
}
.parent {
display: flex;
align-items: center;
justify-content: center;
width: 280px;
padding: 32px;
background-color: #e99;
margin: 32px;
text-align: center;
}
.child {
flex: 1;
max-width: 100%;
background-color: #99e;
}
.grandchild {
overflow-wrap: break-word;
border: 1px dotted black;
}
In Safari, when you hover on the red area the XXXs will stop wrapping.
Hover over the blue area and it will fix and re-wrap.
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
本grandchild
似乎不尊重的最大宽度的限制child
,但只有当父母的风格被修改-而不是当它第一次加载。
我想知道是什么导致了这种行为,这是否已经是Safari的已知问题,还是我应该报告该错误?