0
こんにちは、私はグラフィックデザイナーです。私はSVG Graphicsを扱っています。このページでは、私はそれらをお互いのトップに置いておきたいと思います。どのボタンが押されたかは、ユーザーが見るものに依存します。ここにコードがあり、私はいくつかの余分な見通しを与えるためにワークフローを提供します。コードがぞっとするならば、事前にお詫びします。 ラジオボタンでSVGを切り替えます
function showGroup(group)
{
$("#hideables").children('div.'+group).show();
$("#hideables").children('div').not('.'+group).hide();
}
<div class="catProdAttributeItem"><input type="radio" id="34656268" name="5905984" mandatory="1" onclick="showGroup('Solid')"/><span>Solid </span></div>
<div class="catProdAttributeItem"><input type="radio" id="34656273" name="5905984" mandatory="1" onclick="showGroup('Split')"/><span>Split $10</span></div>
<div class="catProdAttributeItem"><input type="radio" id="34657110" name="5905984" mandatory="1" onclick="showGroup('Marble')"/><span>Marble $15</span></div>
<div class="catProdAttributeItem"><input type="radio" id="34657110" name="5905984" mandatory="1" onclick="showGroup('Split Marble')"/><span>Split Marble $15</span></div>
</div>
<div id="hideables">
<svg id="Solid" xmlns="http://www.w3.org/2000/svg" width="609.1" height="609.1" viewBox="0 0 609.1 609.1">
<title>Avian-Solid</title>
<div class="Solid">
<rect width="610" height="610" style="fill: blue"; class="basecolor"/>
</div>
</svg>
<svg id="Solid" xmlns="http://www.w3.org/2000/svg" width="609.1" height="609.1" viewBox="0 0 609.1 609.1">
<title>Split</title>
<div class="SplitSVG">
<rect width="610" height="610" style="fill: green"; class="basecolor"/>
</div>
</svg>
<svg id="Solid" xmlns="http://www.w3.org/2000/svg" width="609.1" height="609.1" viewBox="0 0 609.1 609.1">
<title>Marble</title>
<div class="MarbleSVG">
<rect width="610" height="610" style="fill: red"; class="basecolor"/>
</div>
</svg>
</div>
ありがとうございます!これは完全に機能し、私が必要としたものを正確に行いました。 –