是否可以使用CSS缩小和增大子元素HTML元素。下面是一个例子,我想看看其他人会如何处理这个问题。我已经看到JQuery的解决方案,但想知道有一个更简单的方法来做到这一点。使用CSS缩小内部html元素
<div class="your_custom_styling_here_for_resizing">
<div style="width: 400px; height: 400px; display: flex;">
<div style="height: 100px; background: #333333; flex: 1;"></div>
<div style="background: #cccccc; flex: 1;"></div>
</div>
</div>
你的元素被缩小,越来越多基于CSS属性。如果你想要一些动态的行为,你需要使用Javascript/jQuery –
所以你知道从父级(your_custom_styling_here_for_resizing)缩小它的唯一方法是使用JS/JQuery?这不需要在儿童样式 – Fab