这个问题已经有答案了:
How to set the size of the bootstrap text and card size(1个答案)
16天前关闭
我是CodeIgniter 4的初学者。所以我做了一张事件卡片,事件的描述很长。当我尝试将事件数据从数据库放入卡片时,卡片是这样的(卡片的长度取决于描述文本的长度):
所以我想最小化它,所以卡将仍然在一个默认的形状,虽然它有很长的描述。因此,当用户想知道完整的描述,他们应该去按钮的细节。谢谢你的回复。很抱歉我没有解释清楚,希望你能理解我的意思。
我搜索了很多教程,似乎我不能更好地解释给搜索引擎,所以它不知道我的意思。它只是显示如何最小化卡片之间的间距,如何对齐文本或图像,或不同类型的卡片等。我还是找不到答案。
1条答案
按热度按时间hmtdttj41#
在视图文件中创建卡片结构
HTML代码:
CSS代码:
最初,您可以根据需要隐藏完整的描述并设置卡片样式。
脚本:
jQuery在单击“Details”按钮时切换完整描述的可见性。
我希望使用完整的答案并澄清此代码:)