Html CSS悬停旋转:模糊和怪异的文本
我有一些带内部文本的圆圈。当我将鼠标悬停在它上面进行旋转时,文本会变得模糊,有点凌乱,直到旋转结束。所以一切都会好起来。 这在所有浏览器中都会发生 我尝试了一些类似的答案,但没有成功 htmlHtml CSS悬停旋转:模糊和怪异的文本,html,css,Html,Css,我有一些带内部文本的圆圈。当我将鼠标悬停在它上面进行旋转时,文本会变得模糊,有点凌乱,直到旋转结束。所以一切都会好起来。 这在所有浏览器中都会发生 我尝试了一些类似的答案,但没有成功 html <div class="circle"> <div class="inner-circle"> <div class="dotted-circle"> <div class="circle__wrapper">
<div class="circle">
<div class="inner-circle">
<div class="dotted-circle">
<div class="circle__wrapper">
<div class="circle__content">
Magic Touch Detox
</div>
</div>
</div>
</div>
</div>
CSS变换在计算亚像素值时通常会导致模糊,这正是野兽的本性 一种解决方案是向容器添加透视和背面可见性值
.circle{
位置:相对位置;
显示:块;
边缘顶部:-6em;
背景色:透明;
颜色:#222;
文本对齐:居中;
z指数:1;
}
.圆圈:之后{
显示:块;
左边距:自动!重要;
右边距:自动!重要;
宽度:170px;
高度:170px;
边界半径:50%;
背景色:#c6c;
内容:“;
}
.点圆{
显示:块;
左边距:自动!重要;
右边距:自动!重要;
边缘顶部:5px;
宽度:160px;
高度:160px;
边框:5px点#fff;
边界半径:50%;
背景色:#c6c;
}
.圆圈,内圈{
位置:绝对位置;
排名:0;
底部:0;
左:0;
宽度:100%;
身高:100%;
不透明度:1;
-webkit转换持续时间:1s;
-moz转换持续时间:1s;
-o-过渡持续时间:1s;
过渡时间:1s;
}
.圆圈.内圈:悬停{
-webkit变换:旋转(7度);/*铬合金、Safari、Opera*/
-moz变换:旋转(7度);
-o变换:旋转(7度);
-ms变换:旋转(7度);/*IE 9*/
变换:旋转(7度);
-webkit转换持续时间:1s;
-moz转换持续时间:1s;
-o-过渡持续时间:1s;
过渡时间:1s;
}
.circle\uu包装{
显示:表格;
宽度:100%;
身高:100%;
}
.圈出内容{
背面可见性:隐藏;
显示:表格单元格;
填充:1em;
垂直对齐:中间对齐;
字体大小:20px;
字体大小:粗体;
颜色:#fff;
}
魔触排毒
我刚刚试过我的MBP retina/Chrome 55,我这边的一切看起来都很好
你有什么样的设置/配置 我想这不是问题的答案。“当我将鼠标悬停在它上面旋转时,文本会变得模糊和有点凌乱,直到旋转结束”同样的事情。你的代码片段也一样。
.treatframe .circle {
position: relative;
display: block;
margin-top: -6em;
background-color: transparent;
color: #222;
text-align: center;
z-index: 1;
}
.circle:after {
display: block;
margin-left: auto !important;
margin-right: auto !important;
width: 170px;
height: 170px;
border-radius: 50%;
background-color: #c6c;
content: "";
}
.dotted-circle {
display: block;
margin-left: auto !important;
margin-right: auto !important;
margin-top: 5px;
width: 160px;
height: 160px;
border: 5px dotted #fff;
border-radius: 50%;
background-color: #c6c;
}
.treatframe .circle .inner-circle {
position: absolute;
top: 0;
bottom: 0;
left: 0;
width: 100%;
height: 100%;
opacity: 1;
-webkit-transition-duration: 1s;
-moz-transition-duration: 1s;
-o-transition-duration: 1s;
transition-duration: 1s;
}
.treatframe .circle .inner-circle:hover {
-webkit-transform: rotate(7deg);/* Chrome, Safari, Opera */
-moz-transform: rotate(7deg);
-o-transform: rotate(7deg);
-ms-transform: rotate(7deg);/* IE 9 */
transform: rotate(7deg);
-webkit-transition-duration: 1s;
-moz-transition-duration: 1s;
-o-transition-duration: 1s;
transition-duration: 1s;
}
.circle__wrapper {
display: table;
width: 100%;
height: 100%;
}
.circle__content {
display: table-cell;
padding: 1em;
vertical-align: middle;
font-size: 20px;
font-weight: bold;
color: #fff;
}