我想调整右上角的DISPLAY_ULTIMATE_PLUS社交媒体按钮。我尝试了几种对齐方法,但它似乎不起作用。这是代码。
<?php
/**
* The template for displaying the header
*
* Displays all of the head element and everything up until the
"site- content" div.
*
* @package WordPress
* @subpackage Twenty_Sixteen
* @since Twenty Sixteen 1.0
*/
?><!DOCTYPE html>
<html <?php language_attributes(); ?> class="no-js">
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="profile" href="http://gmpg.org/xfn/11">
<?php if ( is_singular() && pings_open( get_queried_object() ) ) : ?>
<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>">
<?php endif; ?>
<?php wp_head(); ?>
</head>
<?php echo DISPLAY_ULTIMATE_PLUS(); ?>
<?php echo do_shortcode("[huge_it_slider id='2']"); ?>
<div class='mailmunch-forms-widget-295732'></div>
答案 0 :(得分:0)
申请:
position: absolute;
top: 0;
right: 0;
媒体按钮上的,以及与position: relative;
相对应的父<div>
上的position: fixed;
top: 0;
right: 0;
。
或强>
应用:
style=""
在媒体按钮上。
您可以使用import numpy as np
matrix = np.array([[1,1,1,1,1,0,0,0,0,0], #0 this is the board, it's represented by a 10x10 matrix
[1,1,1,1,0,0,0,0,0,0], #1 the 0s represent empty spaces
[1,1,1,0,0,0,0,0,0,0], #2 the 1s represent player 1's chips
[1,1,0,0,0,0,0,0,0,0], #3 the 2s represetn player 2's chips
[1,0,0,0,0,0,0,0,0,0], #4
[0,0,0,0,0,0,0,0,0,2], #5
[0,0,0,0,0,0,0,0,2,2], #6
[0,0,0,0,0,0,0,2,2,2], #7
[0,0,0,0,0,0,2,2,2,2], #8
[0,0,0,0,0,2,2,2,2,2]]) #9
chips1 = list(tuple(map(tuple,np.fliplr(np.argwhere(matrix == 1))))) #Finds all the positions that contain a 1
chips2 = list(tuple(map(tuple,np.fliplr(np.argwhere(matrix == 2))))) #Finds all the positions that contain a 2
print chips2
def step(x,y): #Finds the possible steps for a checker
listMoves = []
if x > 0 and matrix[x-1][y] == 0: #left
listMoves.append([x-1,y])
if x < 9 and matrix[x+1][y] == 0: #right
listMoves.append([x+1,y])
if y < 9: #up
if matrix[x][y+1] == 0:
listMoves.append([x,y+1])
if x>0 and matrix[x-1][y+1] == 0: #up + left
listMoves.append([x-1,y+1])
if x < 9 and matrix[x+1][y+1] == 0: #up + right
listMoves.append([x+1,y+1])
if y > 0: #down
if matrix[x][y-1] == 0:
listMoves.append([x,y-1])
if x > 0 and matrix[x-1][y-1] == 0: #down + left
listMoves.append([x-1,y-1])
if x<9 and matrix[x+1][y-1] == 0:
listMoves.append([x+1,y-1])
return listMoves
def hopper(x,y): #Finds the possible hops for a checker
listHops = []
if x > 1 and matrix[x-1][y] != 0 and matrix[x-2][y] == 0: #left
listHops.append([x-2,y])
if x < 8 and matrix[x+1][y] != 0 and matrix[x+2][y] == 0: #right
listHops.append([x+2,y])
if y > 1:
if matrix[x][y-1] != 0 and matrix[x][y-2] == 0: #down
listHops.append([x,y-2])
if x>1 and matrix[x-1][y-1] != 0 and matrix[x-2][y-2] == 0: #down + left
listHops.append([x-2,y-2])
if x < 8 and matrix[x+1][y+1] != 0 and matrix[x+2][y-2] == 0: #up + right
listHops.append([x+2,y-2])
if y < 8:
if matrix[x][y+1] != 0 and matrix[x][y+2] == 0: #up
listHops.append([x,y+2])
if x > 1 and matrix[x-1][y+1] != 0 and matrix[x-2][y+2] == 0: #up + left
listHops.append([x-2,y+2])
if x < 8 and matrix[x+1][y+1] != 0 and matrix[x+2][y+2] == 0: #up + right
listHops.append([x+2,y+2])
listHops = listHops + step(x,y)
return listHops
'''
def flipBoard():
global matrix
matrix = np.fliplr(np.flipud(matrix))
return matrix.tolist()
flipBoard()
'''
for i in range(0,len(chips2)): #loops through the list of positions to find all the possible steps and hops for
print hopper(chips2[i][0], chips2[i][1])#every single checker on the board
print matrix
。