在<a> tag

时间:2017-09-21 09:42:23

标签: html css

.img {
    width: 200px;
	height: 150px;
	display: block;
	background-position: 50% 50%;
	background-repeat: no-repeat;
	margin: 0px auto;
	background-size: contain;
}
<div>
  <a href="#" draggable="false">
			<div class="img" style="background-image:url('http://i.imgur.com/tI5jq2c.jpg');">
      </div>
      
			<div class="caption" draggable="false" style="height: 150px;overflow: auto;">												 	
	     <h3>
            Title
         </h3>
				 <p>It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using 'Content here, content here', making it look like readable English. Many desktop publishing packages and web page editors now use Lorem Ipsum as their default model text, and a search for 'lorem ipsum' will uncover many web sites still in their infancy. Various versions have evolved over the years, sometimes by accident, sometimes on purpose (injected humour and the like).</p>
      </div>
  </a>
</div>

When i try to scroll the div by click on the scroll bar it drags. I searched and found the draggable="false" part but it works only on the image.

How can i fix this issue?

1 个答案:

答案 0 :(得分:0)

可能您可以在<p>元素上使用一些CSS。

THIS LINK中,他们给出了一个明确的例子。

我希望我能帮助一下:)

祝你好运, Dimitar Georgiev