新手问题 rails 里面怎么加入 max-width 属性

nicetyler · July 10, 2017 · Last by nicetyler replied at July 13, 2017 · 1360 hits

<%= link_to image_tag("product-2.jpg",alt:"product-1",class: "img-responsive" ),"#" %> 怎么在这个里面加 max-width 属性

link_to(body, url, html_options = {}),html_options 增加 style: “max-width:xxxpx”

link_to image_tag(...), '#', style: 'max-width: 100px;'

为啥不能用 css 写?

Reply to robertyu

好的谢谢

Reply to msg7086

谢了,就这样写了

Reply to cqcn1991

在 css 文件里面写要加一个类

You need to Sign in before reply, if you don't have an account, please Sign up first.