I have created one Static block and added below content in :

<div class="hero-banner"><img src="{{media url='banner.jpg'}}" alt="" width="1251" height="343"></div>

Called this static block in CMS page

{{block class="Magento\\Cms\\Block\\Block" block_id="hero-banner"}}

How can I apply css on hero-banner class in PWA ?

I can add css only HTML tags.

1 Answer 1


I got solution :

You can add class in Static block like below code :

<div class="hero-banner">banner image</div>

Please use the code sample below in your imported CSS file .

:global(.hero-banner) {
  /*some css rules here*/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.