我的字体很棒的图标没有链接到我在标签上设置href的位置。事实上,当我检查它们时,标签上没有href。我有一些演示代码供您查看,但在演示代码中,它确实显示了href,在检查时它没有链接到页面。也许如果修复此代码,它将解决我的问题。感谢
<a href="https://www.google.co.uk/">
<i class="fa fa-facebook-official fa-3x" aria-hidden="true"></i>
</a>
<script src="https://use.fontawesome.com/7c396dc5cb.js"></script>
答案 0 :(得分:4)
为bounds: any;
initializeMap() {
let minZoomLevel = 12;
Geolocation.getCurrentPosition().then((position) => {
this.map = new google.maps.Map(document.getElementById('map_canvas'), {
zoom: minZoomLevel,
center: new google.maps.LatLng(position.coords.latitude, position.coords.longitude),
mapTypeControl: false,
streetViewControl: false,
mapTypeId: google.maps.MapTypeId.ROADMAP
});
this.bounds = new google.maps.LatLngBounds();
var trafficLayer = new google.maps.TrafficLayer();
trafficLayer.setMap(this.map);
this.OriginMarker(this.start_point);
this.TargetMarker(this.end_point);
this.map.fitBounds(this.bounds); //# auto - zoom
this.map.panToBounds(this.bounds); //# auto-center
});
}
OriginMarker(data){
var latlng : string = data.split(',');
var LatLng = new google.maps.LatLng(+latlng[0],+latlng[1]);
let image = 'assets/img/Untitled-1.png';
let marker = new google.maps.Marker({
map: this.map,
animation: google.maps.Animation.DROP,
position: LatLng, icon: image
});
this.bounds.extend(new google.maps.LatLng(marker.position.lat(), marker.position.lng()));
}
TargetMarker(data) {
var latlng : string = data.split(',');
var LatLng = new google.maps.LatLng(+latlng[0],+latlng[1]);
let image = 'assets/img/Untitled-2.png';
let marker = new google.maps.Marker({
map: this.map,
animation: google.maps.Animation.DROP,
position: LatLng , icon: image
});
this.bounds.extend(new google.maps.LatLng(marker.position.lat(), marker.position.lng()));
}
代码提供target
属性。
有些内容:
a
检查更新的fiddle。
答案 1 :(得分:0)
您是否有最新的CDN附加到您的页面以显示图标?