当用户单击视频内容时,播放/暂停按钮会导致视频播放器播放或暂停该视频内容。
您可以按CSS相对于包含该按钮的控制栏来调整按钮的大小、外观和位置。
以下CSS类选择器控制按钮的外观:
.s7smartcropvideoviewer .s7playpausebutton
顶端 |
从上边框的位置,包括内边距。 |
右 |
从右边框的位置,包括内边距。 |
左侧 |
从左边框开始的位置,包括内边距。 |
底部 |
从下边框的位置,包括内边距。 |
width |
按钮的宽度。 |
height |
按钮的高度。 |
背景图像 |
为给定按钮状态显示的图像。 |
背景位置 |
在图稿Sprite中放置(如果使用CSS Sprite)。 请参阅 CSS Sprite . |
此按钮支持 state
, selected
和 replay
属性选择器,可用于将不同的外观应用于不同的按钮状态。 特别是, selected='true'
对应于“play”状态和 selected='false'
对应于“暂停”状态;
属性选择器 replay='true'
在视频到达结尾时进行设置,然后选择按钮将从开头重新开始播放。
按钮工具提示可进行本地化。 请参阅 用户界面元素的本地化 以了解更多信息。
设置32 x 32像素的播放/暂停按钮。 使其距控制栏的上边缘和左边缘六个像素。 最后,在选择或未选择时,针对四个不同的按钮状态中的每个状态显示不同的图像。
.s7smartcropvideoviewer .s7playpausebutton {
top:6px;
left:6px;
width:32px;
height:32px;
}
.s7smartcropvideoviewer .s7playpausebutton[selected='true'][state='up'] {
background-image:url(images/playBtn_up.png);
}
.s7smartcropvideoviewer .s7playpausebutton[selected='true'][state='over'] {
background-image:url(images/playBtn_over.png);
}
.s7smartcropvideoviewer .s7playpausebutton[selected='true'][state='down'] {
background-image:url(images/playBtn_down.png);
}
.s7smartcropvideoviewer .s7playpausebutton[selected='true'][state='disabled'] {
background-image:url(images/playBtn_disabled.png);
}
.s7smartcropvideoviewer .s7playpausebutton[selected='false'][state='up'] {
background-image:url(images/pauseBtn_up.png);
}
.s7smartcropvideoviewer .s7playpausebutton[selected='false'][state='over'] {
background-image:url(images/pauseBtn_over.png);
}
.s7smartcropvideoviewer .s7playpausebutton[selected='false'][state='down'] {
background-image:url(images/pauseBtn_down.png);
}
.s7smartcropvideoviewer .s7playpausebutton[selected='false'][state='disabled'] {
background-image:url(images/pauseBtn_disabled.png); }
}
.s7smartcropvideoviewer .s7playpausebutton[selected='true'][replay='true'][state='up'] {
background-image:url(images/replayBtn_up.png);
}
.s7smartcropvideoviewer .s7playpausebutton[selected='true'][replay='true'][state='over'] {
background-image:url(images/replayBtn_over.png);
}
.s7smartcropvideoviewer .s7playpausebutton[selected='true'][replay='true'][state='down'] {
background-image:url(images/replayBtn_down.png);
}
.s7smartcropvideoviewer .s7playpausebutton[selected='true'][replay='true'][state='disabled'] {
background-image:url(images/replayBtn_disabled.png);
}