如何使用CSS3来调整表格行的大小 [英] How to use CSS3 to resize table rows

查看:168
本文介绍了如何使用CSS3来调整表格行的大小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有这个隐藏表格行的 jsfiddle

I have this jsfiddle that hides tables rows.

我试图将它扩展到 height = 200 而不是隐藏它。

I am trying to get it to expand the row to height=200 instead of hiding it.

随意建议一个更简单的方法(html5等)。

Feel free to suggest an easier method of doing it (html5, etc) as well.

推荐答案

您可以使用jQuery toggle()文档。它允许你定义两个或更多函数来循环每次点击鼠标。

You can use jQuery toggle() with two functions as parameters. Documentation. It allows you to define two or more functions to cycle through on each mouse click.

$(document).ready(function()
{
//slide up and down when click over id #one
$("#one").toggle(
    function()
        {
        $(".togglebox").height(200);
        },
    function()
        {
        $(".togglebox").height(100);
        });
});

演示: http://jsfiddle.net/RNvP4/

这篇关于如何使用CSS3来调整表格行的大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆