首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >转换: scale() Hover Blur

转换: scale() Hover Blur
EN

Stack Overflow用户
提问于 2015-08-11 19:21:30
回答 2查看 442关注 0票数 0

在使用"transform: scale()“时,它似乎暂时模糊了图像和文本。我的小提琴和代码:

HTML:

代码语言:javascript
复制
<table>
  <tbody>
    <tr>
      <!-- The current Image Sources are just PLACEHOLDERS. It is not the final img sources path. -->
      <td>
        <img src="http://opensource.org/files/osi_keyhole_100X100_90ppi.png" width="100px" height="100px">
        <div class="rndSpacing1">The Test</div>
      </td>
      <td>
        <img src="http://opensource.org/files/osi_keyhole_100X100_90ppi.png" width="100px" height="100px">
        <div class="rndSpacing2">Testtest Testtesttesttest</div>
      </td>a
      <td>
        <img src="http://opensource.org/files/osi_keyhole_100X100_90ppi.png" width="100px" height="100px">
        <div class="rndSpacing1">TESt</div>
      </td>
      <td>
        <img src="http://opensource.org/files/osi_keyhole_100X100_90ppi.png" width="100px" height="100px">
        <div class="rndSpacing1">Testt TesttTest</div>
      </td>
    </tr>
    <tr>
      <td>
        <img src="http://opensource.org/files/osi_keyhole_100X100_90ppi.png" width="100px" height="100px">
        <div class="rndSpacing2">TestTest Testtest</div>
      </td>
      <td>
        <img src="http://opensource.org/files/osi_keyhole_100X100_90ppi.png" width="100px" height="100px">
        <div class="rndSpacing2">Test Testtest tests</div>
      </td>
      <td>
        <img src="http://opensource.org/files/osi_keyhole_100X100_90ppi.png" width="100px" height="100px">
        <div class="rndSpacing2">testtest testtest</div>
      </td>
      <td>
        <img src="http://opensource.org/files/osi_keyhole_100X100_90ppi.png" width="100px" height="100px">
        <div class="rndSpacing1">Testtesttesttest</div>
      </td>
    </tr>
  </tbody>
</table>

CSS:

代码语言:javascript
复制
    table, th, td {
    border: 1px solid #8a9398;
    border-collapse: collapse;
    box-shadow: inset 1px 1px 0px 1px white;
    table-layout: fixed;
}
td {
  text-align: center;
  width: 148px;
  height: 180px;
  color: #48515b;
  cursor: pointer;
}
td:hover{
  -ms-transition-duration: 0.2s;
        -ms-transform: scale(1.1);
    -webkit-transition-duration: 0.2s;
        -webkit-transform: scale(1.1);
  box-shadow: 0 0 0 0;
}
td:active {
  -ms-transition-duration: 0.1s;
        -ms-transform: scale(0.95);
    -webkit-transition-duration: 0.1s;
        -webkit-transform: scale(0.95);
  box-shadow: 0 0 0 0;
}

我尝试过一些解决方法,比如在转换中使用宽度和高度,但这会使所有其他表格单元格都扩展。有办法绕过这事吗?

EN

回答 2

Stack Overflow用户

回答已采纳

发布于 2015-08-11 21:56:33

我解决了。

您所需要做的就是在表格单元格中给内容自己的div,然后使用宽度和转换来产生悬停效果。确保给表格单元格“溢出:隐藏”。

票数 0
EN

Stack Overflow用户

发布于 2015-08-11 19:47:19

使初始尺寸成为您要达到的最大规模,并以较低的比例开始。这是一个小提琴,您必须使您的td的宽度更大,但是添加padding

阅读更多

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/31950225

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档