<legend id='kKVXh'><style id='kKVXh'><dir id='kKVXh'><q id='kKVXh'></q></dir></style></legend>

      <bdo id='kKVXh'></bdo><ul id='kKVXh'></ul>
    <tfoot id='kKVXh'></tfoot>
      <i id='kKVXh'><tr id='kKVXh'><dt id='kKVXh'><q id='kKVXh'><span id='kKVXh'><b id='kKVXh'><form id='kKVXh'><ins id='kKVXh'></ins><ul id='kKVXh'></ul><sub id='kKVXh'></sub></form><legend id='kKVXh'></legend><bdo id='kKVXh'><pre id='kKVXh'><center id='kKVXh'></center></pre></bdo></b><th id='kKVXh'></th></span></q></dt></tr></i><div id='kKVXh'><tfoot id='kKVXh'></tfoot><dl id='kKVXh'><fieldset id='kKVXh'></fieldset></dl></div>

      <small id='kKVXh'></small><noframes id='kKVXh'>

    1. 创建具有 6 个角度而不是 4 个角度的自定义 HTML div

      Create custom HTML div which has 6 angles instead of 4 angles(创建具有 6 个角度而不是 4 个角度的自定义 HTML div)
    2. <small id='SOi7A'></small><noframes id='SOi7A'>

        <tbody id='SOi7A'></tbody>
      <tfoot id='SOi7A'></tfoot>
      <legend id='SOi7A'><style id='SOi7A'><dir id='SOi7A'><q id='SOi7A'></q></dir></style></legend>

      <i id='SOi7A'><tr id='SOi7A'><dt id='SOi7A'><q id='SOi7A'><span id='SOi7A'><b id='SOi7A'><form id='SOi7A'><ins id='SOi7A'></ins><ul id='SOi7A'></ul><sub id='SOi7A'></sub></form><legend id='SOi7A'></legend><bdo id='SOi7A'><pre id='SOi7A'><center id='SOi7A'></center></pre></bdo></b><th id='SOi7A'></th></span></q></dt></tr></i><div id='SOi7A'><tfoot id='SOi7A'></tfoot><dl id='SOi7A'><fieldset id='SOi7A'></fieldset></dl></div>

            <bdo id='SOi7A'></bdo><ul id='SOi7A'></ul>
                本文介绍了创建具有 6 个角度而不是 4 个角度的自定义 HTML div的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                我想创建一个特殊的 HTML div,它有 6 个角度而不是 4 个角度.我希望 6 角 div 的文本内容相应地调整形状.有什么办法可以做到这一点?我想使用 2 个(未嵌套)div 元素(或可能的其他 HTML 块元素).

                I want to create a special HTML div which has 6 angles instead of 4 angles. I want text content of 6 angled div adjust to shape accordingly. Is there any way to achieve this? I want to use 2 (NOT NESTED) div elements (or possible other HTML block elements).

                推荐答案

                float 就是为此而生的.

                float is made for this.

                .box {
                  width:400px;
                  padding:20px;
                  border:2px solid;
                  background:lightblue;
                  clip-path:polygon(82px 0,100% 0,100% 100%,0 100%,0 82px,82px 82px); /* hide the float part*/
                }
                .box::before {
                  content:"";
                  float:left;
                  width:80px;
                  height:80px;
                  margin:-20px 20px 20px -20px;
                  border-right:2px solid;
                  border-bottom:2px solid;
                }

                <div class="box">
                Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce id urna eu augue posuere euismod lobortis sed sem. Etiam sed enim nec augue ultrices ultrices vestibulum in justo. Nunc nec euismod urna. In tincidunt, magna molestie elementum venenatis, enim tortor consequat leo, nec ullamcorper purus lorem at ante. In tincidunt, magna molestie elementum venenatis, enim tortor consequat leo, nec ullamcorper purus lorem at In tincidunt, magna molestie elementum venenatis, enim tortor consequat leo, nec ullamcorper purus lorem at
                </div>

                这篇关于创建具有 6 个角度而不是 4 个角度的自定义 HTML div的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                相关文档推荐

                Embed YouTube video - Refused to display in a frame because it set #39;X-Frame-Options#39; to #39;SAMEORIGIN#39;(嵌入 YouTube 视频 - 拒绝显示在框架中,因为它将“X-Frame-Options设置为“SAMEORIGIN)
                Stop embedded youtube iframe?(停止嵌入 youtube iframe?)
                YouTube iframe API: how do I control an iframe player that#39;s already in the HTML?(YouTube iframe API:如何控制 HTML 中已有的 iframe 播放器?)
                Switch/toggle div (jQuery)(切换/切换 div (jQuery))
                Apply jquery (mobile) css classes programatically after rendering has occurred(呈现后以编程方式应用 jquery (mobile) css 类)
                How to avoid name clashes in JavaScript widgets(如何避免 JavaScript 小部件中的名称冲突)
                <i id='H7XJo'><tr id='H7XJo'><dt id='H7XJo'><q id='H7XJo'><span id='H7XJo'><b id='H7XJo'><form id='H7XJo'><ins id='H7XJo'></ins><ul id='H7XJo'></ul><sub id='H7XJo'></sub></form><legend id='H7XJo'></legend><bdo id='H7XJo'><pre id='H7XJo'><center id='H7XJo'></center></pre></bdo></b><th id='H7XJo'></th></span></q></dt></tr></i><div id='H7XJo'><tfoot id='H7XJo'></tfoot><dl id='H7XJo'><fieldset id='H7XJo'></fieldset></dl></div>
                    <tbody id='H7XJo'></tbody>
                        <bdo id='H7XJo'></bdo><ul id='H7XJo'></ul>
                      • <legend id='H7XJo'><style id='H7XJo'><dir id='H7XJo'><q id='H7XJo'></q></dir></style></legend>

                        <small id='H7XJo'></small><noframes id='H7XJo'>

                        • <tfoot id='H7XJo'></tfoot>