Twitter bootstrap 在sphinx RST中合并图像响应类的方法?
因此,在使用Twitter bootstrap 在sphinx RST中合并图像响应类的方法?,twitter-bootstrap,python-sphinx,Twitter Bootstrap,Python Sphinx,因此,在使用rst格式的sphinx时,可以使用以下方法将图像包含到网页中: .. image:: images/pic.png :align: center 但这不适用于需要类img responsive的响应引导。有办法解决这个问题吗?目前,我的解决方案是编写html原始代码: .. raw:: html <div class="container-fluid"> <div class="row"> <img src="ima
rst
格式的sphinx
时,可以使用以下方法将图像包含到网页中:
.. image:: images/pic.png
:align: center
但这不适用于需要类img responsive
的响应引导。有办法解决这个问题吗?目前,我的解决方案是编写html原始代码:
.. raw:: html
<div class="container-fluid">
<div class="row">
<img src="images/pic.png" class="img-responsive">
</div>
</div>
。。原始::html
但这相当笨拙。有没有更简洁的方法来处理这个问题?我也在寻找同样的问题,但很遗憾地发现你的问题没有答案。经过更多的搜索,我确实发现了斯芬克斯的延伸: 基本上,它允许您在新指令(基于图像)中指定其他设置,您可以这样使用:
.. css3image:: /_images/foo.png
:margin: 10px 10px 10px 10px
:margin-left: 10px
:margin-right: 10px
:margin-top: 10px
:border-radius: 10px
:transform-origin: 10px 10px
:translate: 10px 10px
:translateY: 10px
:translateX: 10px
:scaleX: 2.0
:scaleY: 2.0
:rotate: -10deg
我还注意到,在源代码中,似乎可以指定类:
我只是安装了它,并玩了一下。看来它至少做了你想做的一部分?啊,勇敢的清道夫!非常感谢你!