Coder Social home page Coder Social logo

添加评论限高选项 about twikoo HOT 4 OPEN

RoversX avatar RoversX commented on June 28, 2024
添加评论限高选项

from twikoo.

Comments (4)

imaegoo avatar imaegoo commented on June 28, 2024

请提供复现地址

from twikoo.

RoversX avatar RoversX commented on June 28, 2024

请提供复现地址

点击第一条评论的阅读更多,向下滑动出现两个Read More 问题出现在移动端 谢谢

浏览器:iOS safari,只和浏览器宽度,评论高度有关(我记得是34px?)

地址

from twikoo.

HcGys avatar HcGys commented on June 28, 2024

貌似不是twikoo的问题。
折叠是通过以下代码实现的:

.tk-content-expand {
    max-height: none;
}

.tk-content {
    margin-top: 0.5rem;
    overflow: hidden;
    max-height: 500px;
    position: relative;
}

但是,您网站的.tk-content选择器的max-height属性被设置成了2000px:

.tk-content {
    margin-top: 7px !important;
    font-size: 17px;
    max-height: 2000px !important;
    padding: 10px;
    word-break: normal;
    border-radius: 15px;
    font-weight: 500;
}

from twikoo.

RoversX avatar RoversX commented on June 28, 2024

貌似不是twikoo的问题。 折叠是通过以下代码实现的:

.tk-content-expand {
    max-height: none;
}

.tk-content {
    margin-top: 0.5rem;
    overflow: hidden;
    max-height: 500px;
    position: relative;
}

但是,您网站的.tk-content选择器的max-height属性被设置成了2000px:

.tk-content {
    margin-top: 7px !important;
    font-size: 17px;
    max-height: 2000px !important;
    padding: 10px;
    word-break: normal;
    border-radius: 15px;
    font-weight: 500;
}

感谢回复,我查看后发现确实是我的自定义CSS导致的问题,并不是功能本身的问题,抱歉。感谢您们的努力和付出。

不过,我想针对评论高度限制功能提出一些意见。在用户已经点击“阅读更多”的情况下,反复点击可能会显得不太友好。虽然这一功能在楼中楼评论很多时有一定作用,但对于希望一次性查看所有评论的用户来说,这种限制显得有些多余(参考reddit的做法)。

还是建议增加一个选项,让站长决定是否启用这一功能,或者优化逻辑,在首次展开时显示全部内容(像原来的版本一样)。非常感谢!

from twikoo.

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.