简体   繁体   中英

FullCalendar Scheduler : Parallelogram Shaped Events

I would like to change the event shape from a square to a parallelogram, see image below for an example:

在此处输入图片说明

I tried changing the CSS

 .fc-event-container{ background-color:rgba(2,2,2,0.9); float:left; Skew -webkit-transform: skew(-60deg); -moz-transform: skew(-60deg); -o-transform: skew(-60deg); transform: skew(-60deg); } 

But it distorted the event container, see image

在此处输入图片说明

Using info from here How to skew element but keep text normal (unskewed)

.fc-content {
  Skew -webkit-transform: skew(60deg);
  -moz-transform: skew(60deg);
  -o-transform: skew(60deg);
  transform: skew(60deg);
}

Seems to work

https://jsfiddle.net/qjLs3tfa/

The float: left may cause it to shrink the event though as seen in month view in fiddle

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM