Git Product home page Git Product logo

Comments (2)

zgq354 avatar zgq354 commented on August 30, 2024

比较倾向第二个选项,估计工作量在撸对应的 Parser 的正则表达式上

或许可以根据渲染后的元素高度来决定是否增加折叠?

from flarum-0x.

hsxfjames avatar hsxfjames commented on August 30, 2024

根据渲染后的元素高度来决定是否增加折叠

这个高度的选取可能也是众口难调,并且考虑部分浏览器和插件提供锁定字体或字号的功能,简单计算的高度不一定对,可能需要先渲染出一行获得行高,再决定超过多少行折叠~

不过如果是那种透明渐变,下方一行文字类似“点击展开更多”的效果,可能也还不错,而且不用考虑渲染行高了~
image

from flarum-0x.

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.