How do I make an image_tag opaque with Rails?
I have tried the following:
<%= image_tag '...path_to_img', :filter => "alpha(opacity=50)" %>
But it doesn't work. At least it doesn't create errors, but it doesn't make it opaque, ei开发者_C百科ther. I'm rusty on my html/css, and I think from what I've researched so far that the filter/alpha/opacity I tried above is actually css instead of html.
You might want to look into opacity issues w/ different browsers. IE 6 and 7 use a filter others use opacity. In any case I believe you need to move your options into a string not a hash for the image_tag helper.
Try this and compare the html outputted.
"opacity:0.5; filter:alpha(opacity=50);" %>
精彩评论