一些 Tailwind CSS 和 Ant Design Vue 搭配使用的坑

Ant Design Vue Dec 23, 2022

當搭配使用 Tailwind CSS 和 Ant Design Vue,會遇到一些樣式表上的衝突,這裏記錄如下:

Image

由於 Tailwind CSS 將所有的 <img> 元素設置爲 display: block;,而 AImagePreview 中的圖片置中依賴 imgdisplay: inline; 的默認實現,故需要爲 .ant-image-preview-img 手動設置 display: inline;

Tags

Great! You've successfully subscribed.
Great! Next, complete checkout for full access.
Welcome back! You've successfully signed in.
Success! Your account is fully activated, you now have access to all content.