show img bug

This commit is contained in:
yanxd 2013-11-26 20:33:15 +08:00
parent ae8e81fd46
commit 617f31de39
1 changed files with 18 additions and 3 deletions

View File

@ -1,4 +1,3 @@
<!-- < %= javascript_include_tag "ckeditor/ckeditor.js" %> -->
<style type="text/css"> <style type="text/css">
/** { /** {
-webkit-box-sizing: border-box; -webkit-box-sizing: border-box;
@ -22,7 +21,7 @@
width: auto; width: auto;
margin-left: 15%; margin-left: 15%;
padding-top: 1%; padding-top: 1%;
border-left: 2px dotted #EEE;/*#8BE9F3;*/ border-left: 2px dotted #EEE;
} }
.memo-title{ .memo-title{
margin: 1em 0; margin: 1em 0;
@ -44,6 +43,8 @@
margin: 20px; margin: 20px;
} }
.replies{ .replies{
overflow:hidden;
max-width: 100%;
float: right; float: right;
/*max-width: 90%;*/ /*max-width: 90%;*/
} }
@ -55,7 +56,20 @@
border-top: 2px double #C6F3F9; border-top: 2px double #C6F3F9;
/*border-radius: 10px;*/ /*border-radius: 10px;*/
} }
.comments img {
overflow:hidden;
width: 100%;
max-width: 500px;
height: auto;
width:expression(this.width > 500 ? "500px" : this.width+"px");
}
</style> </style>
<script>
$(document).ready(function($) {
var img = $("div > img").css("height", 'auto')
});
</script>
<!-- < %= forum_breadcrum%> --> <!-- < %= forum_breadcrum%> -->
<div class="lz"> <div class="lz">
<div class="lz-left"> <div class="lz-left">
@ -131,7 +145,8 @@
<%= link_to image_tag(url_to_avatar(reply.author), :class => "avatar"), user_path(reply.author) %> <%= link_to image_tag(url_to_avatar(reply.author), :class => "avatar"), user_path(reply.author) %>
</td> </td>
<td class="comments"> <td class="comments">
<div class="wiki"><%=h reply.content.html_safe %></div> <div class="reply_content" ><%=h reply.content.html_safe %></div>
<!-- <div class="wiki">< %=h reply.content.html_safe %></div> -->
<p> <p>
<% if reply.attachments.any?%> <% if reply.attachments.any?%>
<% options = {:author => true} %> <% options = {:author => true} %>