我使用普通的CSS3创建了一个导航栏。但是某些组件(例如输入字段和按钮)是使用角度材质创建的。 我的导航栏在这里很粘。但是使用棱角材质创建的组件与我的导航栏重叠。
navbar CSS是:
position: sticky;
top: 0;
答案 0 :(得分:2)
在导航栏中将导航栏的def write_template_portfolio(self):
"""Create the template for portfolio
"""
# create the worksheet
self.current_worksheet = self.workbook.add_worksheet("Portfolio")
# write header
self.write_value_and_comment(1, 0, "Portfolio name", self.style_header, 'D2', 'Mandatory: The name of your Portfolio...')
self.write_value_and_comment(1, 4, "Benchmark Name:", self.style_header, 'G2', 'Mandatory: The name of your Benchmark...')
self.write_value_and_comment(1, 7, "Market Index Name:", self.style_header, 'J2', 'Mandatory: The name of your Market Index...')
# qualitative information
self.write_value_and_comment(2, 0, "Value Date", self.style_header, 'A3', 'Optional')
self.write_value_and_comment(3, 0, "Inception Date", self.style_header, 'A4', 'Optional')
self.write_value_and_comment(4, 0, "Manager", self.style_header, 'A5', 'Optional')
self.write_value_and_comment(5, 0, "Philosophy", self.style_header, 'A6', 'Optional')
self.write_value_and_comment(6, 0, "Currency", self.style_header, 'A7', 'Optional')
self.write_value_and_comment(7, 0, "Region", self.style_header, 'A8', 'Optional')
# time Series
self.current_worksheet.write(5, 4, "Benchmark Value Date", self.style_header)
self.current_worksheet.write(5, 5, "Benchmark Value", self.style_header)
self.current_worksheet.write(5, 6, "Benchmark Type", self.style_header)
self.current_worksheet.write(5, 7, "Market Index Value Date", self.style_header)
self.current_worksheet.write(5, 8, "Market Index Value", self.style_header)
self.current_worksheet.write(5, 9, "Market Index Type", self.style_header)
for i in range(0, 25):
self.current_worksheet.write(1, 10 + 3 * i, "Name:", self.style_header)
self.current_worksheet.write(2, 10 + 3 * i, "Weight or Market Value:", self.style_header)
self.current_worksheet.write(3, 10 + 3 * i, "Strategy:", self.style_header)
self.current_worksheet.write(4, 10 + 3 * i, "Region:", self.style_header)
self.current_worksheet.write(5, 10 + 3 * i, "Value Date", self.style_header)
self.current_worksheet.write(5, 11 + 3 * i, "Value", self.style_header)
self.current_worksheet.write(5, 12 + 3 * i, "Type", self.style_header)
# change the widths
self.current_worksheet.set_column('A:B', self.legend_width)
self.current_worksheet.set_column('D:CG', self.value_width)
self.current_worksheet.set_row(0, self.title_length)
# add one lonely comment
self.current_worksheet.write_comment('J3', 'Be consistent: put either weights for all funds or market value '
'for all funds !')
# finally, whe color one row over two in the template
for ii in range(4, 500, 2):
self.current_worksheet.set_row(int(ii), [], self.style_rows)
# return the template
self.workbook.close()
xlsx_data = self.output.getvalue()
return xlsx_data
设置为更大的值。
示例:for ii in range(4, 500, 2):
self.current_worksheet.set_row(int(ii), [], self.style_rows)