css - 通过具有半径的 div 删除不可见的承载

标签 css html web

我的问题

我试图让内容紧挨着具有以下内容的 div:css- Border-radius:100%;

I want the text to be by the image

Why is there a gab between the text and image?

Notice how even tho the div has the radius, its still, square; Its invisible

If there a way to make the "invisible bearer radius" too?

What I want

I am doing that(above) by using position:absolute; right:integer;

** 我不想使用 position: absolute;

将 next 设置为半径 div

感觉这不专业

我的问题

如何使用 Position: absolute 使文本位于图像的右侧,紧挨着图像;

代码-html5

<!DOCTYPE html>
<html>

<head>
    <title>Xlaeo-Hom</title>
    <!DOCTYPE html>
    <html>

    <head>
        <title>Xlaeo-Hom</title>
        <link rel="stylesheet" type="text/css" href="..\defaultCSS-css.css\default-css.css" />
        <link rel="stylesheet" type="text/css" href=".\center-css.css" />
    </head>

    <body>

        <div>

            <div class="vvn_flex vvn_flex_center">
                <div class="vvn_main_wrapper">
                    <main role="main">

                        <section>

                            <span class="vvn_flex vvn_connect_wrp">

<section class="vvn_flex vvn_prjwrooadf">
  <span class="">
    <div class="vvn_prj_medContoon vvn_relPos">
      <div class="vvn_project_media_holder vvn_mediaProject_border">
        <img src="https://cdn.pixabay.com/photo/2017/09/27/10/30/robot-2791671_960_720.jpg"/>
      </div>
    </div>
  </span>
                            <span class="">
<div class="vvn_project_abnJI322323" >
  < want to be next to the image :(
</div>
</span>
                        </section>

                        </span>

                        </Section>


                    </main>
                </div>
            </div>



        </div>



    </body>

    </html>
</head>

<body>

    <div>

        <div class="vvn_flex vvn_flex_center">
            <div class="vvn_main_wrapper">
                <main role="main">

                    <section>
                        <!-- media holder_slide_image-->

                    </Section>


                </main>
            </div>
        </div>



    </div>



</body>

</html>

代码-css

 body{
     color:gray;
     margin: 0;
     padding:0;
}
 li{
     list-style-type: none;
}
 .vvn_theme_main{
     margin-top:1rem;
}
 .vvn_flex{
     display: flex;
}
 .vvn_flex_center{
     justify-content: center;
}
 .vvn_flex_dec{
     flex-direction: column;
}
 .vvn_main_wrapper{
     width:90%;
}
 .vvn_1flex{
     flex:1;
}
 .vvn_theme_border{
     border:1px solid lightgray;
}
 .vvn_brgborder{
     border-top:1px solid lightgray;
     border-bottom: 1px solid lightgray;
}
 img{
     width:100%;
     height: 100%;
}
 .vvn_theme_padding{
     padding-left:1rem;
     padding-right: 1rem;
}
 .vvn_theme_margintb{
     padding-top:1rem;
     padding-bottom: 1rem;
}
 .vvn_relPos{
     position: relative;
}
 .vvn_auto_left{
     margin-left:auto;
}
 .vvn_auto_right{
     margin-right: auto;
}
 .vvn_connect_wrp{
     margin-top: 100px;
}
 .vvn_prjwrooadf{
     flex:1;
}
 .vvn_prj_medContoon{
}
 .vvn_project_media_holder{
     height:480px;
     width:480px;
     overflow: hidden;
}
 .vvn_mediaProject_border{
     border-radius: 100%;
     border:1px solid gray;
}
 .vvn_project_abnJI322323{
     line-height: 40px;
}

最佳答案

https://jsfiddle.net/nx12s6y0/

这对我有用,如果这是你想要的,请告诉我

 .vvn_project_abnJI322323{
     line-height: 40px;
     margin-left:-120px;  /*add this*/
}

关于css - 通过具有半径的 div 删除不可见的承载,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48086200/

相关文章:

html - 元素中的不透明度和 z-index

Firefox 错误消息的 HTML 源代码(无法建立此连接错误显示)

php - 使用 PHP 对网站表格进行排序还是有其他选择?

java - 使用 Java HttpResponse 更改响应 url

javascript - 如何在 jquery show() 之后更新页面高度?

html - 在多页上打印表格

html - 是否可以在 CSS 中读取 HTML?

css - 在 Flex 4 中圆化 DateField 的 Angular ?

javascript - 使用 Isotope 的 smartresize() 使 div 流畅

javascript - 使用 React 读取嵌套 JSON 数据