我想将我的svg代码放在Drupal7的html中。但是我不知道我应该把它放在哪个文件中,或者确切地说是哪一行。
我想在我的superfish菜单中放置一个SVG菜单图标(在移动模式下)。我怎么知道应该搜索哪个文件?
这是我的superfish文件:
Option Explicit 'requires that every variable has to be defined before use, e.g. with a Dim statement.
Sub DoStuff_GoodPractice()
Dim lastRowSrc As Long, lastRowDest As Long, i As Long 'declare row counts as Long so all rows can be used
Dim shtSource As Worksheet, shtDestination As Worksheet
Set shtSource = ThisWorkbook.Worksheets("Sheet1") 'full qualified identification of the worksheets
Set shtDestination = ThisWorkbook.Sheets("Sheet2")
lastRowSrc = shtSource.Range("A" & shtSource.Rows.Count).End(xlUp).Row 'determine the last used row
'clear destination sheet and write headers:
shtDestination.Cells.Clear
shtDestination.Range("A1").Value = "Name"
shtDestination.Range("B1").Value = "Hours"
lastRowDest = 1 'start with row 1 as destination
For i = 1 To lastRowSrc 'loop through all used rows
If shtSource.Range("A" & i).Value <> vbNullString And _
shtSource.Range("B" & i).Value <> vbNullString Then 'check if cells are not a null string
shtSource.Range("A" & i & ":B" & i).Copy Destination:=shtDestination.Range("A" & lastRowDest + 1) 'copy current row
lastRowDest = lastRowDest + 1 'jump to the last used row in destination
End If
Next i
End Sub
这是我的svg fle:
?>
<div <?php print $attributes; ?>>
<nav id="main-menu" class="main-menu navigation block-content clearfix2" role="navigation">
<?php print render($title_prefix); ?>
<?php if (isset($title) && $title): ?>
<h3<?php print $title_attributes; ?>><?php print $title; ?></h3>
<?php endif; ?>
<?php print render($title_suffix); ?>
<?php print $content; ?>
</nav>
</div><!-- /.block -->
和?我该怎么办?
答案 0 :(得分:0)
将svg文件保存在主题中,即主题的img
目录中:
/sites/all/themes/my_theme/img/image.svg
或者你把dir放在哪里保存主题图片。
然后将其用作常规图像:
<img src="/sites/all/themes/my_theme/img/image.svg" alt="" />