* { margin: 0; padding: 0; } .calendar-wrapper { max-width: 310px; } .calendar-header { position: relative; background-color: #c61b01; padding: 10px 0; overflow: auto; } .calendar-mid { position: absolute; left: 50%; -webkit-transform: translate(-50%); transform: translate(-50%); } .calendar-header .leftArrow { width: 0; height: 0; border-width: 10px; border-style: solid; border-top-color: transparent; border-bottom-color: transparent; border-left-color: transparent; border-right-color: #ffffff; margin-left: 5px; float: left; cursor: pointer; } .calendar-header .rightArrow { width: 0; height: 0; border-width: 10px; border-style: solid; border-top-color: transparent; border-bottom-color: transparent; border-left-color: #fff; border-right-color: transparent; margin-left: 5px; float: right; cursor: pointer; } ul.weekTip, ul.date { font-size: 0; } ul.weekTip > li, ul.date > li { display: inline-block; box-sizing: border-box; font-size: 15px; color: #000000; width: 40px; height: 40px; border-radius:50%; line-height: 40px; text-align: center; cursor: pointer; margin-bottom: 5px; } ul.weekTip > li:not(:nth-of-type(7n)), ul.date > li:not(:nth-of-type(7n)) { margin-right: 5px; } ul.date > li.active { background-color: rgb(200, 17, 1); color: #ffffff; } ul.date > li.across { border: 1px solid rgb(200, 17, 1); color: rgb(200, 17, 1); } ul > li.weekend { color: rgb(200, 17, 1); } ul > li.disabled { color: lightgray; } #demo { position: relative;}