本文介绍了TR背景与TABLE的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 限时删除!! 你好, 我需要在TR中使用背景图像,每次碰到TD时都不会重启 。可以这样做吗? 具体来说,如果你设置一个neier表的背景图像,现在 你有多少TR和TD,它会显示 完整/未分割的图像(只要你不要覆盖它)。 当我设置TR背景图像时,每个时间我点击了TD它重新种子 图像。我希望有一个TR,它显示一个800px的图像,它的价格是完整的,而不是零碎的。 这可能吗? Ann PS:我知道有一个旧学校 hack,我可以在哪里筑巢,在一个具有我想要的背景的TD上制作 a新桌子,但这非常好。 不优雅的方法。Hi there,I need to use a background image in a TR that does NOT restarteverytime it hits a TD. Can it be done?Specifically, if you set a background image for an entier table, nowmater how many TRs and TDs you have, it will show thecomplete/unfragmented image (as long as you don''t over-ride it).When I set a TR background image, every time I hit a TD it "re-seeds"the image. I want to have a TR that shows an 800px image in it''sentirety, not a fragmented one.Is this possible?AnnPS: I am aware of an "old school" hack, where I can nest tables, makinga new table in a TD that has the background I desire, but this is veryinelegant methinks.推荐答案 我担心'或多或少会让你感到困惑 - CSS 不能这样做,AFAIK。 To使它更优雅,使用一个封闭的div 而不是封闭的表格。I''m afraid that''s more or less what you''re stuck with - CSScan''t do that, AFAIK.To make it a touch more elegant, use an enclosing divinstead of an enclosing table. 哪个您正在使用浏览器吗? 表 { background-image:url(somebigimage.jpg);宽度:800px;身高:600px; } TD { background-image:none; } 适用于Mozilla 1.7x,Opera 7.4 MSIE 4-6 NN7.x适用于旧版NN4.x 但是没有多少... 当应用于TR但也不确定犹太洁食似乎如何显示 与应用于TABLE元素时相同不仅限于TR - 保重, Jonathan ------------------- LITTLE WORKS STUDIO http://www.tittleWorksStudio.com [...]当应用于TR但不确定如何kosher,似乎与应用于TABLE元素时的显示相同,并且不限于 TR[...] Also works when applied to TR but not sure how kosher, seems to display same as when applied to TABLE element and is not confined to TR 是的,它产生了所需的效果Mozilla的。但是,奇怪的是,在Opera中没有 ,图像在每个单元格中重新启动。 有一个粗制的测试文档,当时在 http:// ppewww.ph.gla.ac.uk/~flavell/tests/tablebg.html 其中表格行2,3和5应该显示效果。 它没有在MSIE中产生预期的结果,因为没有什么好的惊喜,但是Opera和MSIE一样的事实让我开始 想知道这是否*应该*起作用。然而,我还没有找到任何规格中的任何东西来反对造型一排桌子和 期望它能够持续工作吗? 我想知道是否有背景位置值和/或 背景附加值可以说服不情愿的浏览器做什么?b $ b想要的?但是,Haven还没有找到任何合适的价值。 问候Yes, it produces the desired effect in Mozilla. But, curiously, notin Opera, where the image is restarted in each cell.There''s a crudely-made test document, for the time being, at http://ppewww.ph.gla.ac.uk/~flavell/tests/tablebg.htmlin which table rows 2, 3 and 5 are supposed to show the effect.That it doesn''t produce the desired result in MSIE came as no greatsurprise, but the fact that Opera does the same as MSIE makes me startto wonder whether this is even *supposed* to work. And yet, I haven''tfound anything in the specifications against styling a table row andexpecting it to work consistently?I wonder whether there are any values of background-position and/orbackground-attach which would persuade reluctant browsers to do what''swanted? Haven''t found any suitable value(s) yet, though.regards 这篇关于TR背景与TABLE的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 1403页,肝出来的..
09-06 15:11