上传文件时候 input 悬停cursor:pointer 无效解决办法

      发布在:前端技术      评论:0 条评论
<p><span style="box-sizing: border-box; outline: 0px; font-weight: 700; overflow-wrap: break-word; color: rgb(77, 77, 77); font-family: -apple-system, &quot;SF UI Text&quot;, Arial, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, &quot;WenQuanYi Micro Hei&quot;, sans-serif; font-size: 16px; font-variant-ligatures: no-common-ligatures; background-color: rgb(255, 255, 255);">给input框的font-size设置成0 即可成功设置成pointer样式</span></p><p><span style="box-sizing: border-box; outline: 0px; font-weight: 700; overflow-wrap: break-word; color: rgb(77, 77, 77); font-family: -apple-system, &quot;SF UI Text&quot;, Arial, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, &quot;WenQuanYi Micro Hei&quot;, sans-serif; font-size: 16px; font-variant-ligatures: no-common-ligatures; background-color: rgb(255, 255, 255);"></span></p><pre style="background-color:#262e37;color:#ffffff;font-family:&#39;Consolas&#39;,monospace;font-size:11.3pt;">&lt;<span style="color:#c32867;font-weight:bold;">div </span><span style="color:#a6e22e;">class</span><span style="color:#e6db74;font-weight:bold;">=&quot;tip&quot; </span><span style="color:#a6e22e;">style</span><span style="color:#e6db74;font-weight:bold;">=&quot;</span><span style="color:#66d9ef;font-style:italic;">line-height</span>: <span style="color:#ae81ff;">30</span><span style="color:#68e868;font-weight:bold;">px</span>;<span style="color:#e6db74;font-weight:bold;">&quot;</span>&gt;&lt;<span style="color:#c32867;font-weight:bold;">input </span><span style="color:#a6e22e;">class</span><span style="color:#e6db74;font-weight:bold;">=&quot;file&quot; </span><span style="color:#a6e22e;">type</span><span style="color:#e6db74;font-weight:bold;">=&quot;file&quot; &nbsp;</span><span style="color:#a6e22e;">onchange</span><span style="color:#e6db74;font-weight:bold;">=&quot;</span><span style="font-style:italic;">avatar_upload</span>(<span style="color:#f92672;">this</span>)<span style="color:#e6db74;font-weight:bold;">&quot; </span><span style="color:#a6e22e;">id</span><span style="color:#e6db74;font-weight:bold;">=&quot;avatar_uploder&quot; </span><span style="color:#a6e22e;">name</span><span style="color:#e6db74;font-weight:bold;">=&quot;file&quot; </span><span style="color:#a6e22e;">style</span><span style="color:#e6db74;font-weight:bold;">=&quot;</span><span style="color:#66d9ef;font-style:italic;">opacity</span>:<span style="color:#ae81ff;">0</span>;<span style="color:#66d9ef;font-style:italic;">cursor</span>: <span style="color:#68e868;font-weight:bold;">pointer</span>;<span style="color:#66d9ef;font-style:italic;">position</span>: <span style="color:#68e868;font-weight:bold;">absolute</span>;<span style="color:#66d9ef;font-style:italic;">z-index</span>: <span style="color:#ae81ff;">99</span>;<span style="color:#66d9ef;font-style:italic;">width</span>: <span style="color:#ae81ff;">60</span><span style="color:#68e868;font-weight:bold;">px</span>;<span style="color:#66d9ef;font-style:italic;">height</span>: <span style="color:#ae81ff;">30</span><span style="color:#68e868;font-weight:bold;">px</span>;<span style="color:#66d9ef;font-style:italic;">font-size</span>: <span style="color:#ae81ff;">0</span>;<span style="color:#e6db74;font-weight:bold;">&quot;</span>&gt;<span style="font-weight:bold;font-family:&#39;宋体&#39;,monospace;">重新上传</span>&lt;/<span style="color:#c32867;font-weight:bold;">div</span>&gt;</pre><p><span style="box-sizing: border-box; outline: 0px; font-weight: 700; overflow-wrap: break-word; color: rgb(77, 77, 77); font-family: -apple-system, &quot;SF UI Text&quot;, Arial, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, &quot;WenQuanYi Micro Hei&quot;, sans-serif; font-size: 16px; font-variant-ligatures: no-common-ligatures; background-color: rgb(255, 255, 255);"></span><br/></p>
相关文章
热门推荐