用于自动堆叠照片库的CSS

时间:2018-01-19 16:51:34

标签: css photo-gallery

我希望这是这个问题的正确的SE论坛。我想知道什么CSS可用于堆叠照片(一堆 import csv, os # os.makedirs() command will create a folder titled in green or in apostrophies os.makedirs('HeaderRemoved', exist_ok=True) # Loop through every file in the current working directory. for csvFilename in os.listdir('directory'): if not csvFilename.endswith('.csv'): continue #skips non-csv files print('Removing header from ' + csvFilename + '...') ### Read the CSV file in (skipping first Row)### csvRows = [] csvFileObj = open(csvFilename) readerObj = csv.reader(csvFileObj) for row in readerObj: if readerObj.line_num == 1: continue # skips first row csvRows.append(row) print (csvRows) #----------->Check to see if it has anything stored in array csvFileObj.close() #Todo: Write out the CSV file csvFileObj = open(os.path.join('HeaderRemoved', 'directory/mainfile.csv'), 'w', newline='') csvWriter = csv.writer(csvFileObj) for row in csvRows: csvWriter.writerow(row) csvFileObj.close() 标签),以便他们在每个设备屏幕尺寸上自动调整宽度和高度。这里有一个例子:www.edwardkb.com/places/但它是一个SquareSpace模板,所以我不知道他们使用的是什么脚本或CSS。谢谢!

1 个答案:

答案 0 :(得分:0)

如果你使用bootstrap 3,只需在你的img标签中添加img-responsive类

<img class="img-responsive"  src="...">

如果您使用bootstrap 4,请在img标签中添加img-fluid类

<img class="img-fluid"  src="...">