I am having an issue while assigning style to a particular div in the blog post section of the shopify development store.
我在shopify开发商店的博客文章部分中为特定div分配样式时遇到问题。
The problem is, it is automatically commenting the whole css part even if i removed the comment and save it, it again comments the whole css part.
问题是,它会自动评论整个css部分,即使我删除了评论并保存它,它再次评论整个css部分。
How can I assign the division a css style?
如何为分部指定css样式?
1 个解决方案
#1
0
The Shopify editor can't read all css in style attribute.
Shopify编辑器无法读取style属性中的所有css。
You can use a class or an id to achieve this. example :
您可以使用类或ID来实现此目的。例子:
<div style="background:yellow">[...]</div>
if this don't work, you can add a Class like this :
如果这不起作用,您可以像这样添加一个类:
<div class="yourclass">[...]</div>
And go in your theme.scss (or main.scss / style.scss depend of your theme) to add style to your element. example :
然后进入你的theme.scss(或main.scss / style.scss取决于你的主题)来为你的元素添加样式。例子:
.yourclass { background:yellow;}
#1
0
The Shopify editor can't read all css in style attribute.
Shopify编辑器无法读取style属性中的所有css。
You can use a class or an id to achieve this. example :
您可以使用类或ID来实现此目的。例子:
<div style="background:yellow">[...]</div>
if this don't work, you can add a Class like this :
如果这不起作用,您可以像这样添加一个类:
<div class="yourclass">[...]</div>
And go in your theme.scss (or main.scss / style.scss depend of your theme) to add style to your element. example :
然后进入你的theme.scss(或main.scss / style.scss取决于你的主题)来为你的元素添加样式。例子:
.yourclass { background:yellow;}