forked from yelog/hexo-theme-3-hexo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d1ebde6
commit 581db42
Showing
9 changed files
with
66 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<div id="musicMouseDrag" style="position:fixed; z-index: 9999; bottom: 0; right: 0;"> | ||
<div id="musicDragArea" style="position: absolute; top: 0; left: 0; width: 100%;height: 10px;cursor: move; z-index: 10;"></div> | ||
<iframe frameborder="no" border="0" marginwidth="0" marginheight="0" width=330 height=340 src="//music.163.com/outchain/player?type=0&id=7680603150&auto=1&height=430"></iframe> | ||
</div> | ||
|
||
<!--以下代码是为了支持随时拖动音乐控件的位置,如没有需求,可去掉下面代码--> | ||
<script> | ||
var $DOC = $(document) | ||
$('#musicMouseDrag').on('mousedown', function (e) { | ||
// 阻止文本选中 | ||
$DOC.bind("selectstart", function () { | ||
return false; | ||
}); | ||
$('#musicDragArea').css('height', '100%'); | ||
var $moveTarget = $('#musicMouseDrag'); | ||
$moveTarget.css('border', '1px dashed grey') | ||
var div_x = e.pageX - $moveTarget.offset().left; | ||
var div_y = e.pageY - $moveTarget.offset().top; | ||
$DOC.on('mousemove', function (e) { | ||
var targetX = e.pageX - div_x; | ||
var targetY = e.pageY - div_y; | ||
targetX = targetX < 0 ? 0 : (targetX + $moveTarget.outerWidth() >= window.innerWidth) ? window.innerWidth - $moveTarget.outerWidth() : targetX; | ||
targetY = targetY < 0 ? 0 : (targetY + $moveTarget.outerHeight() >= window.innerHeight) ? window.innerHeight - $moveTarget.outerHeight() : targetY; | ||
$moveTarget.css({'left': targetX + 'px', 'top': targetY + 'px', 'bottom': 'inherit', 'right': 'inherit'}) | ||
}).on('mouseup', function () { | ||
$DOC.unbind("selectstart"); | ||
$DOC.off('mousemove') | ||
$DOC.off('mouseup') | ||
$moveTarget.css('border', 'none') | ||
$('#musicDragArea').css('height', '10px'); | ||
}) | ||
}) | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,6 +28,7 @@ | |
color white | ||
.more-menus | ||
display: none | ||
padding: 0 6px | ||
.icon | ||
text-align center | ||
margin 0 auto 5px | ||
|