简体   繁体   English

html标签以调整html元素的大小

[英]html tag to resize size of html element

Is there a tag I can wrap around a html table or body to re-size it without affecting the functionality of the content being re sized. 是否可以在html表格或正文中包裹一个标签以调整大小,而又不影响正在调整大小的内容的功能。 Is the best way to do this to wrap the content in a html table and then re size the table itself ? 这样做的最好方法是将内容包装在html表中,然后重新调整表本身的大小吗?

Simplistic case using CSS: 使用CSS的简单案例:

<body class="resize">
    Lorem ipsum..
</body>

Corresponding CSS 对应的CSS

<style>
    .resize {
        font-size: NEW FONT SIZE;
        height: NEW HEIGHT;
        width: NEW WIDTH;
    }
</style>

Or dynamically with jQuery: 或使用jQuery动态:

$('body').addClass('resize');

You can use jquery.wrap() 您可以使用jquery.wrap()

$("#content").wrap("<table>")

    or with attribute

$("#content").wrap("<table id='wrapper'>")

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM