Is there a cross browser way to expand text on click via css?

First, here is what I would like to do: Row 1 Row 2 Row 3 I have code setup so that when I hover over row1, 2 or 3, the row gets highlighted. This is done via css. I would like to be able to (for instance) click row1 and then it would look like this: Row 1 Some text here Row 2 Row 3 That text would stay there until I clicked on a different row at which point it would go away. For instance, let's say I clicked on row 2 next. Row 1 Row 2 Even more text here Row 3 I have found code that talks about using javascript to do this and setting the visibility of the text but I'm not sure how I can do this without having a ton of near duplicate code...

以上就是Is there a cross browser way to expand text on click via css?的详细内容,更多请关注web前端其它相关文章!

赞(0) 打赏
未经允许不得转载:web前端首页 » CSS3 答疑

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

前端开发相关广告投放 更专业 更精准

联系我们

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏