レスポンシブビデオプレーヤーにはCSSwidthプロパティを使用します
ビデオプレーヤーをレスポンシブにするには、widthプロパティを使用して100%に設定します
例
<!DOCTYPE html>
<html>
<head>
<meta name = "viewport" content="width=device-width, initial-scale=1.0">
<style>
video {
width: 100%;
height: auto;
}
</style>
</head>
<body>
<video width = "300" controls autoplay>
<source src = "/html5/foo.ogg" type = "video/ogg" />
<source src = "/html5/foo.mp4" type = "video/mp4" />
</video>
<p>To check the effect, you need to resize the browser.</p>
</body>
</html> -
CSSフォントスタイルプロパティの使用方法
CSS font-styleプロパティを使用すると、テキストに3つの異なるフォントタイプ(スタイル)を適用できます。通常、斜体、斜体です。 .normal{ font-style: normal; } .italic { font-style: italic; } .oblique { font-style: oblique; } normal :は、通常のテキストに使用されるデフォルトのローマン/通常のフォントスタイルです。 italic :強調のために使用される、少し右に傾斜したフォントです。 oblique :強調のために使用される、少し右に傾斜したフォントです。
-
HTMLDOMビデオ幅プロパティ
HTML DOM Video widthプロパティは、メディアの幅(ピクセル単位)に対応する数値を返す/設定します。 構文 以下は構文です- 幅を返す 数値として(px) mediaObject.width 幅を数値(px)に設定 mediaObject.width = number 動画の幅の例を見てみましょう プロパティ- 例 <!DOCTYPE html> <html> <head> <title>HTML DOM Video width</title> <style> * { &n