我没有找到任何关于在没有Symfony2的情况下使用twig的信息.我想在没有symfony框架的自定义网页中使用twig.可能吗?也许有人可以提供另一个模板"系统"或从PHP逃脱HTML的好方法?
<div class = "container">
<div class = "row">
<small>Original picture size is 876x493, I resize it to:</small>
<div class = "property">
<img src = "http://a57.foxnews.com/global.fncstatic.com/static/managed/img/Leisure/2009/876/493/big-house-small-house.png?ve=1&tl=1"/>
</div>
<small>Result I want to get (in another way):</small>
<div class = "property">
<img style = "max-width: 147%" src = "http://a57.foxnews.com/global.fncstatic.com/static/managed/img/Leisure/2009/876/493/big-house-small-house.png?ve=1&tl=1"/>
</div>
</div>
</div>
Run Code Online (Sandbox Code Playgroud)
https://jsfiddle.net/40ay7uco/
我想减少我的图像以适应div.我怎么能用jquery或css做到这一点,没有像我之前那样的mannualy写作.
ps我想保持宽度:高度比