質問編集履歴

2

ボタンのHTMLを追加

2021/05/15 00:12

投稿

minari766
minari766

スコア17

test CHANGED
File without changes
test CHANGED
@@ -130,6 +130,36 @@
130
130
 
131
131
 
132
132
 
133
+ ```HTML
134
+
135
+ <div class="d-flex justify-content-start">
136
+
137
+ <form action="{% url 'like' %}" method="POST">
138
+
139
+ {% csrf_token %}
140
+
141
+ {% if post_data.id in liked_list %}
142
+
143
+ <button id="like" name="{{ post_data.id }}"><i class="fas fa-lg fa-heart liked-red">お気に入り</i></button>
144
+
145
+ {% else %}
146
+
147
+ <button id="like" name="{{ post_data.id }}"><i class="far fa-lg fa-heart liked-red">お気に入り</i></button>
148
+
149
+ {% endif %}
150
+
151
+ </form>
152
+
153
+ <p name="{{ post_data.id }}-count" class="count"> {{ post_data.like_set.count }} </p>
154
+
155
+ <!-- <img src="" alt="コメント"> -->
156
+
157
+ </div>
158
+
159
+ ```
160
+
161
+
162
+
133
163
 
134
164
 
135
165
  ##開発環境

1

説明文を見易くしました

2021/05/15 00:12

投稿

minari766
minari766

スコア17

test CHANGED
@@ -1 +1 @@
1
- (Bootstrap)ボタンの枠線したい
1
+ (Bootstrap)デフォルトボタンのデザイン変更したい
test CHANGED
@@ -1,12 +1,18 @@
1
1
  ##やりたいこと
2
2
 
3
- Bootstrapのボタンの枠線を消したいです
3
+ Bootstrapのボタンの枠線を消し、さらにデフォルトの背景色がグレーになっているので透明に変更したいです
4
+
5
+ CSSにてoutline: none !important;を入力すれば、フレームワークのCSSを上書きできると調べ、試しましたが変化がありません。
4
6
 
5
7
 
6
8
 
7
- ##試したこと
9
+ なお、枠線を消したいのは、記事投稿アプリの♡お気に入りボタンです。
8
10
 
11
+
12
+
9
- CSSにてoutline: none !important;を入力すれば、フレームワークのCSSを上書きできると調べ、試しましたが特に変化がありません。
13
+ ![イメージ説明](e287cc1f16135332ee51a0f6085fde9f.png)
14
+
15
+
10
16
 
11
17
 
12
18
 
@@ -92,9 +98,9 @@
92
98
 
93
99
  color: #ed638b;
94
100
 
95
- width: 200px;
101
+ width: 150px;
96
102
 
97
- height: 100px;
103
+ height: auto;
98
104
 
99
105
  outline: none !important;
100
106
 
@@ -108,9 +114,9 @@
108
114
 
109
115
  .like-button{
110
116
 
111
- width: 200px;
117
+ width: 150px;
112
118
 
113
- height: 100px;
119
+ height: auto;
114
120
 
115
121
  outline: none !important;
116
122