<tfoot id='jI1Ri'></tfoot>

<legend id='jI1Ri'><style id='jI1Ri'><dir id='jI1Ri'><q id='jI1Ri'></q></dir></style></legend>

        • <bdo id='jI1Ri'></bdo><ul id='jI1Ri'></ul>
      1. <small id='jI1Ri'></small><noframes id='jI1Ri'>

        <i id='jI1Ri'><tr id='jI1Ri'><dt id='jI1Ri'><q id='jI1Ri'><span id='jI1Ri'><b id='jI1Ri'><form id='jI1Ri'><ins id='jI1Ri'></ins><ul id='jI1Ri'></ul><sub id='jI1Ri'></sub></form><legend id='jI1Ri'></legend><bdo id='jI1Ri'><pre id='jI1Ri'><center id='jI1Ri'></center></pre></bdo></b><th id='jI1Ri'></th></span></q></dt></tr></i><div id='jI1Ri'><tfoot id='jI1Ri'></tfoot><dl id='jI1Ri'><fieldset id='jI1Ri'></fieldset></dl></div>

        CSS3 过渡:是否有不使用 JQuery 的点击选项?

        时间:2023-11-01
      2. <small id='sHxQQ'></small><noframes id='sHxQQ'>

            • <i id='sHxQQ'><tr id='sHxQQ'><dt id='sHxQQ'><q id='sHxQQ'><span id='sHxQQ'><b id='sHxQQ'><form id='sHxQQ'><ins id='sHxQQ'></ins><ul id='sHxQQ'></ul><sub id='sHxQQ'></sub></form><legend id='sHxQQ'></legend><bdo id='sHxQQ'><pre id='sHxQQ'><center id='sHxQQ'></center></pre></bdo></b><th id='sHxQQ'></th></span></q></dt></tr></i><div id='sHxQQ'><tfoot id='sHxQQ'></tfoot><dl id='sHxQQ'><fieldset id='sHxQQ'></fieldset></dl></div>
              <legend id='sHxQQ'><style id='sHxQQ'><dir id='sHxQQ'><q id='sHxQQ'></q></dir></style></legend>

                  <tbody id='sHxQQ'></tbody>
              1. <tfoot id='sHxQQ'></tfoot>

                  <bdo id='sHxQQ'></bdo><ul id='sHxQQ'></ul>
                • 本文介绍了CSS3 过渡:是否有不使用 JQuery 的点击选项?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  这很好用:

                  <style type="text/css"> 
                      div
                      {
                      width:100px;
                      height:100px;
                      background:red;
                      transition:width 2s;
                      -moz-transition:width 2s; /* Firefox 4 */
                      -webkit-transition:width 2s; /* Safari and Chrome */
                      -o-transition:width 2s; /* Opera */
                      }
                  
                      div:hover
                      {
                      width:300px;
                      }
                      </style>
                  

                  但是有没有人知道使用点击而不是悬停来做到这一点的方法?不涉及JQuery?

                  But does anyone know of a way to do this using click instead of hover? And not involving JQuery?

                  谢谢!

                  推荐答案

                  可以这样写:

                  CSS

                  input{display:none}
                  .ani
                      {
                      width:100px;
                      height:100px;
                      background:red;
                      transition:width 2s;
                      -moz-transition:width 2s; /* Firefox 4 */
                      -webkit-transition:width 2s; /* Safari and Chrome */
                      -o-transition:width 2s; /* Opera */
                      display:block;
                      }
                  input:checked + .ani{width:300px;}
                  

                  HTML

                  <input type="checkbox" id="button">
                  <label class="ani" for="button"></label>
                  

                  检查这个 http://jsfiddle.net/nMNJE/

                  这篇关于CSS3 过渡:是否有不使用 JQuery 的点击选项?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:为什么这个 CSS 转换在锚点内的 SVG 上不起作用 下一篇:显示 <div>或&lt;跨度&gt;在图像上:悬停

                  相关文章

                  <small id='gerPN'></small><noframes id='gerPN'>

                    <tfoot id='gerPN'></tfoot>

                      <legend id='gerPN'><style id='gerPN'><dir id='gerPN'><q id='gerPN'></q></dir></style></legend>

                    1. <i id='gerPN'><tr id='gerPN'><dt id='gerPN'><q id='gerPN'><span id='gerPN'><b id='gerPN'><form id='gerPN'><ins id='gerPN'></ins><ul id='gerPN'></ul><sub id='gerPN'></sub></form><legend id='gerPN'></legend><bdo id='gerPN'><pre id='gerPN'><center id='gerPN'></center></pre></bdo></b><th id='gerPN'></th></span></q></dt></tr></i><div id='gerPN'><tfoot id='gerPN'></tfoot><dl id='gerPN'><fieldset id='gerPN'></fieldset></dl></div>
                        <bdo id='gerPN'></bdo><ul id='gerPN'></ul>