Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Carousel Component will have an additional 5px when using div->img label #8244

Closed
Labels
@gentingincubus

Description

  • I have searched the issues of this repository and believe that this is not a duplicate.

Version

4.2.6

Environment

win10、chrome137.0.7151.120、vue3

Reproduction link

Edit on CodeSandbox

Steps to reproduce

Carousel Component, provide it <div><img/></div> structure as content.

What is expected?

<img>should completely fill the <div>’s height

What is actually happening?

It will have an additional 5px under the <img>,it cause unexpected results ,such as when you set border-radius of Carousel container an so on.


The reason is that img is inline and the default vertical-align of the image is baseline.This will result in a blank space below the image.Normally, adding vertical-align: bottom in a div will solve the problem.However,it not effect in Carousel,i dont know why,unless added it in inner class (ant-image)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

        AltStyle によって変換されたページ (->オリジナル) /