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>
相关推荐
lvchaoq24 分钟前
页面停留时间过长导致token过期问题
前端
elangyipi12329 分钟前
深入理解前端项目中的 package.json 和 package-lock.json
前端·json
LYFlied41 分钟前
【算法解题模板】-【回溯】----“试错式”问题解决利器
前端·数据结构·算法·leetcode·面试·职场和发展
composurext42 分钟前
录音切片上传
前端·javascript·css
程序员小寒42 分钟前
前端高频面试题:深拷贝和浅拷贝的区别?
前端·javascript·面试
狮子座的男孩1 小时前
html+css基础:07、css2的复合选择器_伪类选择器(概念、动态伪类、结构伪类(核心)、否定伪类、UI伪类、目标伪类、语言伪类)及伪元素选择器
前端·css·经验分享·html·伪类选择器·伪元素选择器·结构伪类
zhougl9961 小时前
Vue 中的 `render` 函数
前端·javascript·vue.js
听风吟丶1 小时前
Spring Boot 自动配置深度解析:原理、实战与源码追踪
前端·bootstrap·html
跟着珅聪学java1 小时前
HTML中设置<select>下拉框默认值的详细教程
开发语言·前端·javascript
IT_陈寒1 小时前
JavaScript 性能优化:5个被低估的V8引擎技巧让你的代码提速50%
前端·人工智能·后端