質問するログイン新規登録

質問編集履歴

2

詳細なコードと状況、イメージを追記しました

2018/02/04 03:10

投稿

lyzmfeqpxs54
lyzmfeqpxs54

スコア237

title CHANGED
File without changes
body CHANGED
@@ -19,9 +19,7 @@
19
19
 
20
20
  ```Ruby
21
21
 
22
- <%= image_tag "/xxx/yyy", :size => 300 %>
23
22
 
24
-
25
23
  show.html.erb
26
24
 
27
25
 

1

詳細なコードと状況を追記しました

2018/02/04 03:10

投稿

lyzmfeqpxs54
lyzmfeqpxs54

スコア237

title CHANGED
File without changes
body CHANGED
@@ -13,8 +13,37 @@
13
13
  初歩的な質問で申し訳ございませんが
14
14
  ご教示のほどお願いいたします。
15
15
 
16
+ 追記
17
+ コードと状況を追記しました
18
+ ![イメージ説明](914700180c0bfcf1d2a8f89bb58de6a7.png)
19
+
16
20
  ```Ruby
17
21
 
18
22
  <%= image_tag "/xxx/yyy", :size => 300 %>
19
23
 
24
+
25
+ show.html.erb
26
+
27
+
28
+ <% post[:post_image].each do |pic| %>
29
+ <div class="post_image_pic">
30
+ <%= link_to (image_tag "/uploads/#{params[:xxxx}/#{pic}", :size => 380, :style => "border:solid 2px #aaaaaa"),
31
+ "/uploads/#{params[:xxxx]}/#{pic}", :'data-lightbox' => "abc" %>
32
+   <%= link_to (image_tag ("buy.png"), :width => "150"), "/#{params[:xxxx]}/buy}" %>
33
+ </div>
34
+ <% end %>
35
+
36
+
37
+
38
+
39
+ CSS
40
+
41
+ .post_image_pic {
42
+ width: 380px;
43
+ margin: 0 8px 24px 0;
44
+ display: inline-block;
45
+ vertical-align: top;
46
+ }
47
+
48
+
20
49
  ```