CSS实现文字环绕圆形展示

展示区域

代码区域

javascript 复制代码
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .content{
            width: 300px;
            height: auto;
            margin: 100px;
            --border-color:#333;
        }
        .content-main{
            padding: 20px;
            border-left: 1px solid var(--border-color);
            border-bottom: 1px solid var(--border-color);
            border-right: 1px solid var(--border-color);
            padding-top: 20px;
        }
        .content-header{
            height: 20px;
            transform: translateY(50%);
            display: flex;
            align-items: center;
        }
        .content-header-line{
            height: 1px;
            width: 20px;
            background-color: var(--border-color);
        }
        .content-header-lineMax{
            flex: 1;
        }

        .layout{
            ---layoutH:200px;
            height: 200px;
            width: 700px;
            display: flex;
            justify-content: center;
        }
        .layout-center{
            width: var(---layoutH);
            min-width: var(---layoutH);
            max-width: var(---layoutH);
            height: var(---layoutH);
            min-height: var(---layoutH);
            border-radius: 50%;
            border: 1px solid #ccc;
        }
        .layout-left,
        .layout-right{
            display: flex;
            height: 100%;
            flex-direction: column;
            justify-content: center;
        }
        .layout-lr-item+
        .layout-lr-item{
            margin-top: 30px;
        }
        .layout-left .layout-lr-item:nth-child(1),
        .layout-left .layout-lr-item:nth-child(5){
            transform: translateX(30px);
        }

        .layout-right .layout-lr-item:nth-child(1),
        .layout-right .layout-lr-item:nth-child(5){
            transform: translateX(-30px);
        }
    </style>
</head>
<body>
    <div class="content">
        <div class="content-header">
            <div class="content-header-line"></div>
            <div class="content-header-title">首位标题</div>
            <div class="content-header-line content-header-lineMax"></div>
        </div>
        <div class="content-main">
            内部消息展示
        </div>
    </div>


    <div class="layout">
        <div class="layout-left">
            <div class="layout-lr-item">环绕中......</div>
            <div class="layout-lr-item">环绕中......</div>
            <div class="layout-lr-item">环绕中......</div>
            <div class="layout-lr-item">环绕中......</div>
            <div class="layout-lr-item">环绕中......</div>
        </div>
        <div class="layout-center">

        </div>
        <div class="layout-right">
            <div class="layout-lr-item">环绕中......</div>
            <div class="layout-lr-item">环绕中......</div>
            <div class="layout-lr-item">环绕中......</div>
            <div class="layout-lr-item">环绕中......</div>
            <div class="layout-lr-item">环绕中......</div>
        </div>
    </div>
</body>
</html>
相关推荐
茶底世界之下10 分钟前
羽毛颜色已经很鲜艳,还要继续加色吗?用 Awaking 试一次减饱和
前端·ios·运营
风早爽太19 分钟前
Mac 搭建 Vue 开发环境
前端·vue.js
Lank_M22 分钟前
Word图片裁剪转HTML失效,转换器各漏读了哪一层
前端
青烟小生28 分钟前
前端架构设计实战:从组件思维到系统思维
前端
Amos_Web42 分钟前
Rspack 源码解析(二十):Typed Hook 系统如何靠宏生成
前端·rust·前端框架
程序员大阳1 小时前
副队长CSS教程(29)–CSS Grid 实战:实现通用图文混排布局
前端·css·grid·图文混排
对空六课1 小时前
无头浏览器访问对跳出率的过滤规则
服务器·前端·算法·数据分析
小番茄夫斯基1 小时前
Nginx 介绍
前端
小番茄夫斯基1 小时前
如果我一个前端页面要被用户看到,原理是什么,用户怎么通过网址就看到页面的,这背后要怎么弄
前端