givanz / VvvebJs

Drag and drop page builder library written in vanilla javascript without dependencies or build tools.
https://www.vvveb.com/vvvebjs/editor.html
Apache License 2.0
6.91k stars 1.59k forks source link

stretched-link 识别问题 #296

Open lixiang4543 opened 1 year ago

lixiang4543 commented 1 year ago

对于元素块内如果a标签使用了链接延伸 stretched-link 的样式,那么整个块内的其他元素就识别不出来,只能识别出这个a标签来

givanz commented 1 year ago

Hi

Can you please include a screenshot or provide more details like how to reproduce the stretched link issue?

lixiang4543 commented 1 year ago

Hi The a tag marked stretched-link style is recognized by all areas in the red box below

image

The code is as follows:

image
givanz commented 1 year ago

Hi

For stretched-link to work on the whole card you need to have position:relative on the parent container, in your case you need to add position-relative class to the top div

<div class="col-lg-4 col-md-6 service-item d-flex position-relative">

If you want the opposite, to apply the link only the a element then add position-relative class to the a tag only

<a href="service-details.html" class="readmore stretched-link position-relative"><span>Learn more</span> 

https://getbootstrap.com/docs/5.3/helpers/stretched-link/

lixiang4543 commented 1 year ago

Thank you for your suggestion. There seems to be no change when I add it.

image