使用CSS“剪辑”的Safari渲染错误(Safari rendering bug with CSS “clip”)
Safari有以下问题: http : //cl.ly/ZlJ8
LiveDemo: http ://drpdev.de/labs/example.html
完整的源代码: http : //jsfiddle.net/uqsghon7/
<div class="row"> <div class="rowcontainer"> <div class="side"> ... </div> </div> </div> ... (multiple times with different contents in .side)
和风格:
.side { height: auto; padding-left: 50px; margin: auto; position: fixed; top: 50%; left: 0; bottom: 0; width: 350px; ... } .row { ... position: relative; overflow: hidden; } .rowcontainer { position:absolute; top: 0; left: 0; right: 0; bottom: 0; padding: 0; margin: 0; clip: rect(0, auto, auto, 0); overflow:hidden; }
它适用于Chrome和Firefox。 在我试图实现它只有位置固定在(相对定位)div(没有第二个容器)和溢出隐藏,它在所有的浏览器,但不是Firefox的,所以我必须做这个解决方法与CSS剪辑...它实际上也可以在Safari浏览器中运行,但似乎Safari的渲染引擎在滚动时不会刷新视图...
有任何想法吗?
I have the following issue with Safari: http://cl.ly/ZlJ8
LiveDemo: http://drpdev.de/labs/example.html
full source code: http://jsfiddle.net/uqsghon7/
<div class="row"> <div class="rowcontainer"> <div class="side"> ... </div> </div> </div> ... (multiple times with different contents in .side)
and style:
.side { height: auto; padding-left: 50px; margin: auto; position: fixed; top: 50%; left: 0; bottom: 0; width: 350px; ... } .row { ... position: relative; overflow: hidden; } .rowcontainer { position:absolute; top: 0; left: 0; right: 0; bottom: 0; padding: 0; margin: 0; clip: rect(0, auto, auto, 0); overflow:hidden; }
It works perfectly in Chrome and Firefox. Before I tried to achieve it only with position fixed inside the (relative positioned) div (without second container) and overflow hidden and it worked in all browser but not Firefox, so I had to do this workaround with css-clip... It actually works in Safari as well but it seems like Safari's render engine is not refreshing the view when scrolling...
Any ideas?
原文:https://stackoverflow.com/questions/28488059
最满意答案
您最喜欢的选择:
- pip install django-reversion == 1.6.3
- pip install Django == 1.4.0
- 检查一切是否正常并忽略警告,因为这不是错误。
如果您选择升级reversion,则可能需要执行
./manage.py migrate reversion
。Your options, from most preferable to least:
- pip install django-reversion==1.6.3
- pip install Django==1.4.0
- Check that everything is working and ignore the warning, as it is not an error.
If you choose to upgrade reversion, you might need to do
./manage.py migrate reversion
.
相关问答
更多-
所以,解决方案非常简单。 我在修订控制下保存了我的对象。 # imports same as question class TestRevisioning(test.TestCase): fixtures = ['MyModel'] def testDelete(self): object1 = models.MyModel.objects.first() # set up initial revision with reversion.c ...
-
django-reversion恢复admin以外的ManyToMany字段(django-reversion revert ManyToMany fields outside admin)[2023-02-04]
如果我理解正确,我认为你应该得到该版本的修订 ; 该版本包含对象的数据,该版本包含多个对象的版本。 看一下: some_version.revision.version_set.all() 具体来说,我认为你应该使用(未经测试): [v for V版本.objects.get_for_date(product,ondate).revision.version_set.all()如果version.content_type == ContentType.objects.get_for_model(Sku)] ... -
当你在服务器上有多个站点时,你应该考虑使用类似virtualenv的东西。 使用它你可以设置不同的虚拟环境,并将站点特定的包等放在那里,而不是搞乱你的站点包文件夹。 它还使开发变得更容易,因为您可以轻松地使用您使用的任何特定版本在本地设置这些环境。 如果您使用其他应用程序,这很快就会变得非常方便,而且这是Pinax非常重要的用途。 处理包和版本的最简单方法就是创建需求文件。 When you have more than one site on a server, you should consider u ...
-
Django 1.4,1.5和1.6的文档已于2016年2月从官方docs.djangoproject.com网站上删除。有关详细信息,请参阅django-developers网站上的此讨论 。 您仍然可以在readthedocs上查看Django 1.4及更高版本的文档 。 对于早期版本的Django,您可以在GitHub上查看源文件(例如, Django 1.3 ),但如果您需要html版本,则必须自己尝试构建它们。 The docs for Django 1.4, 1.5 and 1.6 were r ...
-
您最喜欢的选择: pip install django-reversion == 1.6.3 pip install Django == 1.4.0 检查一切是否正常并忽略警告,因为这不是错误。 如果您选择升级reversion,则可能需要执行./manage.py migrate reversion 。 Your options, from most preferable to least: pip install django-reversion==1.6.3 pip install Django==1 ...
-
如何在django reversion中存储父指针和数据?(How to store parent pointers and data in a django reversion?)[2022-09-09]
所以你得出一个结论, prevent reversion from letting those signals fire https://docs.djangoproject.com/en/dev/topics/signals/#disconnecting-signals django-reversion本身使用Signal.connect并断开连接。 https://github.com/etianen/django-reversion/blob/b2f5f3362054b2b72a95bee1ed0df ... -
如果在Django Reversion中没有任何更改,请勿创建新版本(Don't create new version if nothing has changed in Django-reversion)[2024-03-20]
您可以使用ignore_duplicates选项 。 不幸 它不遵循关系,因为它可能会变得非常昂贵并且非常快速地变慢。 如果你真的想忽视跟随关系的重复,你有两种可能性: 做叉子和禁用限制 删除and explicit在这里https://github.com/etianen/django-reversion/blob/master/reversion/revisions.py#L199 默认情况下,将ignore_duplicates设置为True https://github.com/etianen/dj ... -
要找出正在使用的Python,请记录sys.executable的值。 它应该包含正在使用的解释器的路径。 To find out which Python is being used, log the value of sys.executable. It should contain the path to the interpreter being used.
-
revision是Version上的外键。 并且, reversion.get_for_object(Model)只返回Version s的查询集。 因此,对于该查询集中的任何项目,您只需访问该用户即可: version.revision.user 更新:只是为了更明确: versions = reversion.get_for_object(MyModel) for version in versions: print '%s made this revision' % version.rev ...
-
SCALING是一个32位有符号整数,值为0x20 。 您将左移1到0x20 (32)位。 这意味着你将它移得太远,导致未定义的行为。 标准的相关引用: E1 << E2的结果是E1左移E2位位置; 腾出的位用零填充。 如果E1具有无符号类型,则结果的值为E1×2E2,模数比结果类型中可表示的最大值减1。 如果E1具有有符号类型和非负值,并且在结果类型中可以表示E1×2E2,那么这就是结果值; 否则,行为是未定的。 SCALING is a 32-bit signed integer with the va ...