Warna Hover & Background Menu

Assalamu alaikum. Gimana cara ubah warna hover menu (saat hover warna nya jadi abu2 gelap) dan warna background nya (orange jadi warna kuning seperti logo) yang sebelah kiri???

Berikut gambarnya. Mohon jawabannya. Terima Kasih.

avatar KhadijahAlra
@KhadijahAlra

5 Kontribusi 1 Poin

Diperbarui 7 tahun yang lalu

4 Jawaban:

kalo pakek css mungkin gitu revrensinya atau https://www.w3schools.com/

 a:hover {
    background-color: yellow;
}
avatar wedev
@wedev

86 Kontribusi 23 Poin

Dipost 7 tahun yang lalu

contohnya seperti code berikut :


li a:hover{
 color : grey; // warna tulisan berubah menjadi abu abu
 background-color : yellow; // latar belakangnya berubah menjadi kuning
}

avatar arisid96
@arisid96

179 Kontribusi 71 Poin

Dipost 7 tahun yang lalu

Makasih atas jawabannya.

koreksi : 1. abu2 maksud sy bukan warna tulisannya tapi background saat hover nya jadi abu2 gelap.

berikut listing yg skrg.

 <!-- Left Sidebar Menu -->
<div class="fixed-sidebar-left">
	<div class="bg-yellow">
			<div id=""	style="height: 130px; width: 130px; line-height: 100px; padding: 15px;" class="easy-pie-chart"><img src="<?= base_url() ?>assets/dist/img/pasikola.png" width="100%" height="100%" alt="" class="avatar img-circle" style="margin-left: 40%">
			</div>
		</div>
	<ul class="nav navbar-nav side-nav nicescroll-bar bg-yellow color-menu">
		<li class="mt-10">
			<?php $active_status = array("style"=>"color:#ffffff;");
			if($this->router->fetch_class()."/".$this->router->fetch_method() == "admin/dashboard")
				$active_status['class'] = "active";
			else
				$active_status['class'] = null;?>
			<?=anchor("admin/dashboard", "<i class='icon-speedometer mr-10 mt'></i> Dashboard", $active_status)?>
		</li>
		<li>
			<?php if($this->router->fetch_class() == "passenger")
				$active_status['class'] = "active";
			else
				$active_status['class'] = null;?>
			<?=anchor("passenger", "<i class='icon-map mr-10'></i> Atur rute", $active_status)?>
		</li>
		<li>
			<?php if($this->router->fetch_class() == "announcement")
				$active_status['class'] = "active";
			else
				$active_status['class'] = null;?>
			<?=anchor("announcement", "<i class='icon-cursor mr-10'></i> Posts", $active_status)?>
		</li>
		<li>
			<?php
			$master_data = array("school", "student", "studentparent", "driver");
			$active_status = "";
			if(in_array($this->router->fetch_class(), $master_data))
			$active_status = "class='active'"; ?>
			<a <?=$active_status?> href="javascript:void(0);" data-toggle="collapse" data-target="#dashboard_dr" style="color:#ffffff";"><i class="icon-folder mr-10"></i>Master Data<span class="pull-right"><span class="label label-success mr-10"></span><i class="fa fa-fw fa-angle-down"></i></span></a>
			<ul id="dashboard_dr" class="collapse collapse-level-1">
				<li>
					<?php $active_status = array("style"=>"color:#ffffff;");
					if($this->router->fetch_class() == "school")
					$active_status['class'] = "active"; ?>
					<?=anchor("school", "<i class='icon-briefcase mr-10'></i> Sekolah", $active_status)?>
				</li>
				<li>
					<?php if($this->router->fetch_class() == "studentparent")
					$active_status['class'] = "active"; ?>
					<?=anchor("studentparent", "<i class='icon-user-female mr-10'></i> Orang Tua", $active_status)?>
				</li>
				<li>
					<?php if($this->router->fetch_class() == "student")
					$active_status['class'] = "active"; ?>
					<?=anchor("student", "<i class='icon-graduation mr-10'></i> Siswa", $active_status)?>
				</li>
				<li>
					<?php if($this->router->fetch_class() == "driver")
					$active_status['class'] = "active"; ?>
					<?=anchor("driver", "<i class='icon-support mr-10'></i> Pengemudi", $active_status)?>
				</li>
			</ul>
		</li>
	</ul>
</div>
<!-- /Left Sidebar Menu -->
avatar KhadijahAlra
@KhadijahAlra

5 Kontribusi 1 Poin

Dipost 7 tahun yang lalu

Pake javascript gan lihat di https://www.w3schools.com

avatar sptndc
@sptndc

247 Kontribusi 59 Poin

Dipost 7 tahun yang lalu

Login untuk ikut Jawaban