How to rotate an iFrame using javascript?

2019-08-19 07:14发布

问题:

I have an iFrame:

    <div class="embed-responsive embed-responsive-16by9">
       <iframe id="camera_view" class="embed-responsive-item container well well-small span6" style="height: 720px; width: 1280px; background-color: #2e2e2e;" src="www.google.com">
       </iframe>
    </div>

How to rotate using javascript?

Note: I am using Bootstrap for CSS. jQuery for javascript.

回答1:

There is the transform property in css3

#camera_view {
  transform: rotate(45deg);
}

hope it helps