如何倾斜和重叠 Css 中的制表符?

how to slant and overlap a tab in Css?

如何倾斜选项卡磁贴的侧面我想让它像一个 sublime 选项卡

.tab li.tile {
  min-width: -webkit-min-content;
  min-width: -moz-min-content;
  min-width: min-content;
  height: 30px;
  overflow: hidden;
  border-bottom: none;
  border-top: solid 0.5px #636363;
  border-right: solid 0.5px #636363;
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
  font-size: 0.8em;
  align-items: center;
  margin: 0;
  padding: 0;
  color: inherit
}

你可以这样做:

$('.tile').prepend('<div class="tr"></div>')
               .prepend('<div class="tl"></div>')
.tile {
    position: relative;
    margin: 10px;
    width: 200px;
    height: 15px;
    padding: 20px;
    background-color: #ccc;
    text-align: center;
}

.tile .tl, .tile .tr,
.tile .bl, .tile .br {
    width: 0; 
    height: 0;
    position: absolute;        
}

.tile .tl {
    top: 0;
    left: 0;
    border-top: 60px solid white; 
    border-right: 20px solid transparent;
}
.tile .tr {
    top: 0;
    right: 0;
    border-top: 60px solid white; 
    border-left: 20px solid transparent;
}
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<div class="tile">
    Hello world!
</div>