diff --git a/APlayer.css b/APlayer.css index 8867457..e44f2ad 100644 --- a/APlayer.css +++ b/APlayer.css @@ -65,6 +65,14 @@ content: '\e802'; } +.aplayer-narrow { + width: 66px; +} + +.aplayer-narrow .aplayer-info { + display: none; +} + .aplayer { font-family: Arial, Helvetica, sans-serif; margin: 5px; diff --git a/APlayer.js b/APlayer.js index b2ae770..523200b 100644 --- a/APlayer.js +++ b/APlayer.js @@ -46,6 +46,11 @@ APlayer.prototype.init = function () { + '' + ''; + // 切换窄样式 + if (this.option.narrow) { + this.element.classList.add('aplayer-narrow'); + } + // 创建audio元素 this.audio = document.createElement("audio"); this.audio.src = this.music.url; diff --git a/demo/index.html b/demo/index.html index 03d64b6..7ac18de 100644 --- a/demo/index.html +++ b/demo/index.html @@ -2,17 +2,81 @@
-
+
\ No newline at end of file
diff --git a/package.json b/package.json
index d1f6c02..250ad31 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "aplayer",
- "version": "1.0.5",
+ "version": "1.0.6",
"description": "Wow, such a beautiful html5 music player",
"main": "APlayer.js",
"scripts": {