Git Product home page Git Product logo

Comments (1)

Mr-VincentW avatar Mr-VincentW commented on May 26, 2024

感谢反馈。这是有意设计的。

很多网站使用 pseudo-elements 来给图片添加遮罩、小标签等缀饰,浮图秀目前通过 mouseover 事件侦测目标图片,这些叠加在图片之上的缀饰会阻碍浮图秀正常展示大图(鼠标移过时大图预览浮层将消失)。鉴于 pseudo-elements 并不能承载事件触发(相关标准截至本条回复发出时还没有被任何浏览器厂商支持),也不能承载 pseudo-class 样式,此“入侵性”方案预期不会严重影响页面原有功能。我能够想到的唯一产生影响的场景是:pseudo-elements 定位(absolute/fixed)于宿主元素之外,此时该方案将使这些 pseudo-elements 无法触发其宿主元素的鼠标事件及 pseudo-class 样式;然而这样的布局实现在实际应用中少之又少(出于语义、SEO等方面的考量),故而几经权衡后浮图秀决定采用目前的方案。

我正在试验另一种非入侵性的探测目标图片的方案,如果可行,未来浮图秀将不再通过 pointer-events: none 干预页面任何原有样式。

您如果发现任何基于此产生的严重影响,欢迎补充详述,我将重新评估该方案。

我将保持此 issue open 直到新的方案有一个结果。

from photoshow.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.